1 Reply Latest reply on May 22, 2012 7:30 AM by ivan_ra

    rich:column sortBy does not render sort facets in RF 4.X

    ivan_ra

      After migration from 3.3.3 to 4.x all data tables loose sort headers.

      In 3.3.3 it was enough to mark sortable column like this:

       

      {code:xml}

      <rich:dataTable value="#{productList.items}" var="item" id="productList">

           <rich:column sortBy="#{item.productName}">

                <f:facet name="header">

                     <h:outputText value="product name" />

                </f:facet>

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

           </rich:column>
      ...

       

      <rich:dataTable>

      {code}

       

      As result richfases render table with sort facets in column headers. I got table with sorting "out of the box",  with both orders (asc and desc). After migration to 4.2.2 facets stil rendered in JBoss Tools preview, but no links and facets in result table.

      Now I have to write some additional javasripts or actions to sort my table, like this:

       

       

      {code:xml}

      <rich:dataTable value="#{productList.items}" var="item" id="productList">

           <rich:column sortBy="#{item.productName}" id="pname">

                <f:facet name="header">

                     <h:outputLink value="javascript:#{rich:component('productList')}.sort('pname');">

                          <h:outputText value="product name" />

                     </h:outputLink>

                </f:facet>

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

           </rich:column>

       

      ...

      <rich:dataTable>

      {code}

       

      Is it expected behavior of new richfaces ot its just bug?