6 Replies Latest reply on Mar 18, 2008 3:43 AM by Kto ToTaki

    rich:dataTable, rich:column and sortExpression

    Kto ToTaki Newbie

      Can anyone explain me how to sort data in a dataTable clicking on header ?
      Should I use my own Comparator or not ?

      My code are :

      <rich:dataTable width="700px" id="productTabell" rows="20"
       value="#{productCatalogMBean.products}" var="product" >
       <rich:column id="produktnr" sortExpression="#{product.productCode}" sortable="true">
       <f:facet name="header"><h:outputText value="Produktnr." styleClass="headerText" /></f:facet>
       <h:outputText value="#{product.productCode}" />
       <rich:column id="Produktnavn" sortExpression="#{product.name}">
       <f:facet name="header"><h:outputText value="Produktnavn" styleClass="headerText" /></f:facet>
       <h:outputText value="#{product.name}" />