1 Reply Latest reply on Apr 30, 2008 11:03 AM by ronanker

    subTable in the header of a rich:datatable

    ronanker

      Hi all,

      Is there a way to put a rich:subtable in the header of a rich:datatable ?

      I tried something like :

      <rich:dataTable value="#{mylist}"
       var="item" >
       <f:facet name="header">
       <rich:columnGroup>
       ..... some column titles here
       </rich:columnGroup>
       <rich:subTable var="total"
       value="#{totals}".....
       </rich:subTable>
       </f:facet>
      ..... some columns here
      </rich:dataTable>


      Is this should work ?

      I'm using richfaces 3.2.0.

      Thanks for the help.

        • 1. Re: subTable in the header of a rich:datatable
          ronanker

          Yes it's possible:

          The code above is *almost* good. A <h:facet> must have only one child.
          So we must add a <h:panelgroup>

          <rich:dataTable value="#{mylist}"
           var="item" >
           <f:facet name="header">
           <h:panelgroup>
           <rich:columnGroup>
           ..... some column titles here
           </rich:columnGroup>
           <rich:subTable var="total"
           value="#{totals}".....
           </rich:subTable>
           </h:panelgroup>
           </f:facet>
          ..... some columns here
          </rich:dataTable>