1 Reply Latest reply on Feb 28, 2011 3:51 AM by ilya_shaikovsky

    Issues with rowspan in extendedDataTable. R4 M6

    rlcaswell

      I'm using Richfaces 4.0.0.20110209-M6 on Glassfish with jsf-api and jsf-impl 2.0.3-b03. running on windows XP.

      I have the need to have a column span multiple rows in a data table; however, I also need to have a selectionchange listener on this table.  So, this would mean that I would need to use an extendedDataTable.  The problem I am having is that the extended datatable will not render correctly for me.

       

      The following xhtml is used to render a simple datatable correctly:

                  <rich:dataTable  value="#{dataTableController.data}" var="datum">

                      <f:facet name="header">

                          <rich:columnGroup>

                              <rich:column ><h:outputText value="Group" id="groupHeader"/></rich:column>

                              <rich:column ><h:outputText value="Item" id="itemHeader"/></rich:column>

                          </rich:columnGroup>

                      </f:facet>

                    <rich:column rowspan="#{2}" rendered="#{datum.renderGroup}">

                        <h:outputText value="#{datum.group}" />

                    </rich:column>

                    <rich:column rowspan="#{1}" >

                        <h:outputText value="#{datum.item}" />

                    </rich:column>

                  </rich:dataTable>

       

      This renders the following:

      GroupItem
      group11.0
      1.1
      group22.0
      2.1
      group33.0
      3.1

       

       

      However when I simply change the dataTable to an extendedDataTable the output looks as follows:

       

      GroupItem
      1.0
      1.1
      2.0
      2.1
      3.0
      3.1

       

      If I remove the header facet from the extendedDatatable it appears as follows:

      1.0
      1.1
      2.0
      2.1
      3.0
      3.1

       

      If I remove the rowspan but leave the header facet in the extendedDatatable I get the following:

      GroupItem
      group11.0
      group11.1
      group22.0
      group22.1
      group33.0
      group33.1

       

      So it appears there are two possible problems with using extendedDataTable.  It appears that using the header facet with columnGroup doesn't work correctly, and it appears that the rowspan attribute is not working correctly either.

       

      I've attached a sample war and source.jar file to show my examples.  Any suggestions of a workaround here are welcome.