简体   繁体   中英

Using Tomahawk dataTable and varDetailToggler, I want a fixed header with scrollable rows

I've looked at other solutions for this problem, but they all seem to suggest using rich:scollableDataTable or rich:extendedDataTable. Neither of those provide the varDetailToggler functionality.

I've also seen a solution which splits the header into a separate table. Unfortunately, this solution breaks the use of varDetailToggler as well. The header contains buttons for ExpandAll and CollapseAll for the details.

Is there a Tomahawk solution?

Here's my solution:

        <t:dataTable id="data" var="phen"
            value="#{workflowLookup.dataModel}" 
            binding="#{workflowLookup.table}" 
            varDetailToggler="detailToggler">
            <f:facet name="header">
                <h:commandButton
                    id="expand-all-button"
                    action="#{detailToggler.expandAllDetails}"
                    value="Expand All" />                                  
                <h:commandButton
                    id="collapse-all-button"
                    action="#{workflowLookup.collapseAllDetails}" 
                    value="Collapse All" />
            </f:facet>
            ... (rest of table)

        </t:dataTable>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM