You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthew Tuttle (JIRA)" <de...@myfaces.apache.org> on 2012/09/24 22:58:08 UTC
[jira] [Created] (TOMAHAWK-1639)
AbstractHtmlDataTable.expandAllDetails() doesn't work unless rowKey is
specified on dataTable
Matthew Tuttle created TOMAHAWK-1639:
----------------------------------------
Summary: 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
[jira] [Commented] (TOMAHAWK-1639)
AbstractHtmlDataTable.expandAllDetails() doesn't work unless rowKey is
specified on dataTable
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ 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
[jira] [Resolved] (TOMAHAWK-1639)
AbstractHtmlDataTable.expandAllDetails() doesn't work unless rowKey is
specified on dataTable
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved TOMAHAWK-1639.
--------------------------------------
Resolution: Fixed
Fix Version/s: 1.1.14-SNAPSHOT
Assignee: Leonardo Uribe
I have created a new interface called DetailTogglerModel, just to know which methods should be called from varDetailToggler assigned value. This is the method list:
/**
* Collapse all details of all rows in all pages.
*/
public void collapseAllDetails();
/**
* Expand all details of the rows displayed on the current page.
*/
public void collapseAllPageDetails();
/**
* Expand all details of all rows in all pages.
*/
public void expandAllDetails();
/**
* Expand all details of the rows displayed on the current page.
*/
public void expandAllPageDetails();
/**
* Return true if the current detail row is expanded.
*
* @return true if the current detail row is expanded.
*/
public boolean isCurrentDetailExpanded();
/**
* Change the status of the current detail row from collapsed to expanded or
* viceversa.
*/
public void toggleDetail();
/**
* true|false - true if the detailStamp should be expanded by default. default: false
*
*/
public boolean isDetailStampExpandedDefault();
> 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
> Assignee: Leonardo Uribe
> Priority: Minor
> Fix For: 1.1.14-SNAPSHOT
>
>
> 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