[ https://issues.apache.org/jira/browse/TOMAHAWK-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462312#comment-13462312 ]
Leonardo Uribe commented on TOMAHAWK-1639: ------------------------------------------ I checked the code and the report is correct. But looking in deep, it seems expandAllDetails() and collapseAllDetails() logic does not take into account: - Whether detailStampExpandedDefault is true or false. - When detailStamp is used together with pagination (t:dataScroller). I think the right thing to do is clear _expandedNodes and set detailStampExpandedDefault correctly when expandAllDetails() and collapseAllDetails() is called, to minimize the data stored into the state (otherwise a full iteration over datamodel is required) , and add two new methods expandAllPageDetails() and collapseAllPageDetails(), to expand and collapse properly all items of the current page without change detailStampExpandedDefault value. Suggestions are welcome. > AbstractHtmlDataTable.expandAllDetails() doesn't work unless rowKey is > specified on dataTable > --------------------------------------------------------------------------------------------- > > Key: TOMAHAWK-1639 > URL: https://issues.apache.org/jira/browse/TOMAHAWK-1639 > Project: MyFaces Tomahawk > Issue Type: Bug > Components: Extended Datatable > Affects Versions: 1.1.13 > Reporter: Matthew Tuttle > Priority: Minor > > AbstractHtmlDataTable.expandAllDetails() needs modified to work when a rowKey > isn't specified on a dataTable. Since it currently relies on a rowKey being > specified expandAllDetails() fails to function properly when called from a > header or footer. > Example (Doesn't Work): > <t:dataTable id="table" value="#{bean.values}" var="com" > varDetailToggler="detailToggler" rowKey="#{com.ID}"> > <f:facet name="header"> > <t:commandLink action="#{detailToggler.expandAllDetails}"> > <t:outputText value="Show All" /> > </t:commandLink> > </f:facet> > Example (Does Work - ONLY if rowKey is specified): > <t:dataTable id="table" value="#{bean.values}" var="com" > varDetailToggler="detailToggler" rowKey="#{com.ID}"> > <t:column> > <f:facet name="header"> > <t:outputText value="Test" /> > </f:facet> > <t:commandLink action="#{detailToggler.expandAllDetails}"> > <t:outputText value="Show All" /> > </t:commandLink> > </t:column> -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira