myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Tasso (JIRA)" <>
Subject [jira] Created: (MYFACES-1064) Patch for detail row in t:dataTable
Date Thu, 26 Jan 2006 20:53:09 GMT
Patch for detail row in t:dataTable

         Key: MYFACES-1064
     Project: MyFaces
        Type: New Feature
  Components: Tomahawk  
    Versions: Nightly    
    Reporter: Claudio Tasso

This is a patch which adds a new feature to t:dataTable.
This feature is inspired by Oracle ADF table, which has facet called "detailStamp".
A detail row can be associated to every row in the table, and each detail row has an expanded
or collapsed state.
So, the user can collapse or expand the detail associated to a row. 
The content of the detail row is specified inside the "detailStamp" facet and the user can
add a column to the table which is used for expanding or collapsing the detail row.
Here's an example of usage:

<t:dataTable varDetailToggler="toggler" value="#{testBean.persons}" var="item">    
           <%--  The Detail Column --%>
               <f:facet name="header">
                   <h:outputText value="Details"/>
               <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
                   <h:graphicImage url="opened.gif" style="border: none;"/>
               <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
                   <h:graphicImage url="closed.gif" style="border: none;"/>
          <%-- Other columns --%>
               <f:facet name="header">
                   <h:outputText value="Name" />
               <h:outputText value="#{}"></h:outputText>
               <f:facet name="header">
                   <h:outputText value="Surname" />
               <h:outputText value="#{item.surname}"></h:outputText>
            <%-- The detail ROW --%>
          <f:facet name="detailStamp">
               <h:outputText value="The current detail..."/>

As you can see,  using the "varDetailToggler" attribute is possible expand/collapse the current
detail row (using an action method) and obtaining the state of the current detail row in order
to show different command links.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message