1 Reply Latest reply on Dec 15, 2009 6:20 AM by Ilya Shaikovsky

    Column order problem in rich:extendedDataTable

    ZJ DA Newbie

      Hi, Here is my data table to display the children of an object:

       

      <rich:extendedDataTable value="#{childrenTable}" var="row" rows="6" id="childrenTable"
      width="100%" height="175px" selection="#{childrenTable.selection}"
      enableContextMenu="false" tableState="#{childrenTable.tableState}"
      binding="#{uiChildrenTable}" style="position:relative;" sortMode="multi">

      <rich:column sortable="false" width="25px">
      <h:graphicImage value="#{row.icon}" />
      </rich:column>

      <rich:columns value="#{childrenTable.propertyNames}" sortable="true"
      sortBy="#{propName}" var="propName" index="index" id="column#{index}"
      sortOrder="#{childrenTable.sortOrders[propName]}">
      <f:facet name="header">
      <h:outputText value="#{propName}" />
      </f:facet>
      <h:outputText value="#{row.map[propName]}" />
      </rich:columns>
      </rich:extendedDataTable>

      Initially it displays correctly with the icon column first.  After I left the page then come back, however, the icon column would be the last coulumn.  The uiChildrenTable has a request scope:

       

      <managed-bean>
              <managed-bean-name>uiChildrenTable</managed-bean-name>
              <managed-bean-class>
                  org.richfaces.component.html.HtmlExtendedDataTable
              </managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
          </managed-bean>

       

       

      The problem occurs randomly and I cannot figure out under what  scenario  it occurs.

       

      Thanks in advance,

      -ZJ