0 Replies Latest reply on Sep 15, 2011 6:07 AM by sathyachand

    rich:Datatable is sorted only in ascending order

    sathyachand

      Hi,
      I m using richfaces 3.3.3.final.
      I am trying to use the built in sorting functionality for the datatable.

      The problem here is when i first click on a column, its sorted ascending when i again click on that column its not sorted descending.  But when i click on other columns and again come to that column its sorted ascending. Any way sorting happens only in ascending order for all the columns.what could be the error?

       

      The code Im using is:

       

      <rich:dataTable var="list"  value="#{Bean.detailList}" >

      <rich:column sortBy="#{list.industry}" >

                  <f:facet name="header">

                      <h:outputText value="Industry"/>

                  </f:facet>

                  <h:outputText value="#{list.industry}" />

              </rich:column>

              <rich:column sortBy="#{list.sector}">

                  <f:facet name="header">

                      <h:outputText value="Sector"/>

                  </f:facet>

                  <h:outputText value="#{list.sector}" />

              </rich:column>

      </rich:dataTable>