You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Claudio Tasso (JIRA)" <de...@myfaces.apache.org> on 2006/01/26 21:53:09 UTC

[jira] Created: (MYFACES-1064) Patch for detail row in t:dataTable

Patch for detail row in t:dataTable
-----------------------------------

         Key: MYFACES-1064
         URL: http://issues.apache.org/jira/browse/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 --%>
           <t:column>
               <f:facet name="header">
                   <h:outputText value="Details"/>
               </f:facet>
               <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
                   <h:graphicImage url="opened.gif" style="border: none;"/>
               </h:commandLink>
               <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
                   <h:graphicImage url="closed.gif" style="border: none;"/>
               </h:commandLink>
           </t:column>
          <%-- Other columns --%>
           <t:column>
               <f:facet name="header">
                   <h:outputText value="Name" />
               </f:facet>
               <h:outputText value="#{item.name}"></h:outputText>
           </t:column>
           <t:column>
               <f:facet name="header">
                   <h:outputText value="Surname" />
               </f:facet>
               <h:outputText value="#{item.surname}"></h:outputText>
           </t:column>
            <%-- The detail ROW --%>
          <f:facet name="detailStamp">
               <h:outputText value="The current detail..."/>
           </f:facet>
       </t:dataTable>

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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1064) Patch for detail row in t:dataTable

Posted by "Claudio Tasso (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1064?page=all ]

Claudio Tasso updated MYFACES-1064:
-----------------------------------

    Attachment: patch.zip

The patch which adds the new feature described to t:dataTable

> Patch for detail row in t:dataTable
> -----------------------------------
>
>          Key: MYFACES-1064
>          URL: http://issues.apache.org/jira/browse/MYFACES-1064
>      Project: MyFaces
>         Type: New Feature
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Claudio Tasso
>  Attachments: patch.zip
>
> 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 --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Details"/>
>                </f:facet>
>                <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="opened.gif" style="border: none;"/>
>                </h:commandLink>
>                <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="closed.gif" style="border: none;"/>
>                </h:commandLink>
>            </t:column>
>           <%-- Other columns --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Name" />
>                </f:facet>
>                <h:outputText value="#{item.name}"></h:outputText>
>            </t:column>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Surname" />
>                </f:facet>
>                <h:outputText value="#{item.surname}"></h:outputText>
>            </t:column>
>             <%-- The detail ROW --%>
>           <f:facet name="detailStamp">
>                <h:outputText value="The current detail..."/>
>            </f:facet>
>        </t:dataTable>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1064) Patch for detail row in t:dataTable

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1064?page=comments#action_12365271 ] 

Martin Marinschek commented on MYFACES-1064:
--------------------------------------------

Claudio,

just committed your stuff - could you also provide an example for the myfaces-simple-example sub-project?

would be great!

regards,

Martin

> Patch for detail row in t:dataTable
> -----------------------------------
>
>          Key: MYFACES-1064
>          URL: http://issues.apache.org/jira/browse/MYFACES-1064
>      Project: MyFaces
>         Type: New Feature
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Claudio Tasso
>     Assignee: Martin Marinschek
>  Attachments: patch.zip
>
> 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 --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Details"/>
>                </f:facet>
>                <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="opened.gif" style="border: none;"/>
>                </h:commandLink>
>                <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="closed.gif" style="border: none;"/>
>                </h:commandLink>
>            </t:column>
>           <%-- Other columns --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Name" />
>                </f:facet>
>                <h:outputText value="#{item.name}"></h:outputText>
>            </t:column>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Surname" />
>                </f:facet>
>                <h:outputText value="#{item.surname}"></h:outputText>
>            </t:column>
>             <%-- The detail ROW --%>
>           <f:facet name="detailStamp">
>                <h:outputText value="The current detail..."/>
>            </f:facet>
>        </t:dataTable>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (MYFACES-1064) Patch for detail row in t:dataTable

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1064?page=all ]
     
Martin Marinschek closed MYFACES-1064:
--------------------------------------

    Fix Version: Nightly
     Resolution: Fixed

Thanks again to Claudio Tasso

> Patch for detail row in t:dataTable
> -----------------------------------
>
>          Key: MYFACES-1064
>          URL: http://issues.apache.org/jira/browse/MYFACES-1064
>      Project: MyFaces
>         Type: New Feature
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Claudio Tasso
>     Assignee: Martin Marinschek
>      Fix For: Nightly
>  Attachments: Patch_ExtendedDataTable_AND_Example.zip, patch.zip
>
> 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 --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Details"/>
>                </f:facet>
>                <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="opened.gif" style="border: none;"/>
>                </h:commandLink>
>                <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="closed.gif" style="border: none;"/>
>                </h:commandLink>
>            </t:column>
>           <%-- Other columns --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Name" />
>                </f:facet>
>                <h:outputText value="#{item.name}"></h:outputText>
>            </t:column>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Surname" />
>                </f:facet>
>                <h:outputText value="#{item.surname}"></h:outputText>
>            </t:column>
>             <%-- The detail ROW --%>
>           <f:facet name="detailStamp">
>                <h:outputText value="The current detail..."/>
>            </f:facet>
>        </t:dataTable>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (MYFACES-1064) Patch for detail row in t:dataTable

Posted by "Claudio Tasso (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1064?page=all ]

Claudio Tasso updated MYFACES-1064:
-----------------------------------

    Attachment: Patch_ExtendedDataTable_AND_Example.zip

Restoring and saving state for new properties was missing, now it's added. The getter for "detailToggler" property is also added because of problems with introspection.
An example is also provided for  the myfaces-simple-example sub-project. The master-detail table has been modified, now the cities of a country are displayed in the detail row.

> Patch for detail row in t:dataTable
> -----------------------------------
>
>          Key: MYFACES-1064
>          URL: http://issues.apache.org/jira/browse/MYFACES-1064
>      Project: MyFaces
>         Type: New Feature
>   Components: Tomahawk
>     Versions: Nightly
>     Reporter: Claudio Tasso
>     Assignee: Martin Marinschek
>  Attachments: Patch_ExtendedDataTable_AND_Example.zip, patch.zip
>
> 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 --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Details"/>
>                </f:facet>
>                <h:commandLink rendered="#{toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="opened.gif" style="border: none;"/>
>                </h:commandLink>
>                <h:commandLink  rendered="#{!toggler.currentDetailExpanded}" action="#{toggler.toggleDetail}">
>                    <h:graphicImage url="closed.gif" style="border: none;"/>
>                </h:commandLink>
>            </t:column>
>           <%-- Other columns --%>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Name" />
>                </f:facet>
>                <h:outputText value="#{item.name}"></h:outputText>
>            </t:column>
>            <t:column>
>                <f:facet name="header">
>                    <h:outputText value="Surname" />
>                </f:facet>
>                <h:outputText value="#{item.surname}"></h:outputText>
>            </t:column>
>             <%-- The detail ROW --%>
>           <f:facet name="detailStamp">
>                <h:outputText value="The current detail..."/>
>            </f:facet>
>        </t:dataTable>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira