0 Replies Latest reply on Jun 26, 2008 5:43 AM by Morten Rasmussen

    dataTable sort binding?

    Morten Rasmussen Newbie

      Hi there,

      Is it possible to bind the sorting of a dataTable to a backingbean, so the backingbean remembers how the user wants the datatable to be sorted.

      I.e. something like this:

      <rich:dataTable value="#{fooBackingbean.items}" var="item" sort="#{fooBackingBean.sort}">
      
       <rich:column sortBy="#{item.someProperty}">
       <f:facet name="header">Some property</f:facet>
       <h:outputText value="#{item.someProperty}"/>
       </rich:column>
      
       <rich:column sortBy="#{item.someOtherProperty}">
       <f:facet name="header">Some property</f:facet>
       <h:outputText value="#{item.someOtherProperty}"/>
       </rich:column>
      
      </rich:dataTable>
      


      Any ideas?

      Cheers,
      ~Morten :-)