0 Replies Latest reply on Sep 19, 2012 10:04 AM by bojanantonovic

    RichFaces 4.2: sorting doesn't work when rich:columnGroup occurs

    bojanantonovic

      Hi all

       

      Either I'm using rich:columnGroup together with sorting in rich:dataTable wrong, or it's a bug.

       

      works:

       

      <rich:dataTable value="#{cc.attrs.results}" var="x1"

      id="table321">

      <f:facet name="header">

        <rich:column>

         foo

         <a4j:commandLink value="↕" render="table321"

          action="#{y.toggleSortingOrder('table321_shoeSize')}" />

        </rich:column>

      </f:facet>

      <rich:column sortBy="#{x1.shoeSize}"

        sortOrder="#{y.getSortingOrder('table321_shoeSize')}">

        <h:outputText value="#{x1.shoeSize}" />

      </rich:column>

      </rich:dataTable>

       

      work's too (but with different displaying):

       

      <rich:dataTable value="#{cc.attrs.results}" var="x1"

      id="table321">

      <rich:column sortBy="#{x1.shoeSize}"

        sortOrder="#{y.getSortingOrder('table321_shoeSize')}">

        <f:facet name="header">

         foo

         <a4j:commandLink value="↕" render="table321"

          action="#{y.toggleSortingOrder('table321_shoeSize')}" />

        </f:facet>

        <h:outputText value="#{x1.shoeSize}" />

      </rich:column>

      </rich:dataTable>

       

      doesn't work:

       

       

      <rich:dataTable value="#{cc.attrs.results}" var="x1"

      id="table321">

      <f:facet name="header">

        <rich:columnGroup>

         <rich:column>

          foo

          <a4j:commandLink value="↕" render="table321"

           action="#{y.toggleSortingOrder('table321_shoeSize')}"/>

         </rich:column>

        </rich:columnGroup>

      </f:facet>

      <rich:columnGroup>

        <rich:column sortBy="#{x1.shoeSize}"

         sortOrder="#{y.getSortingOrder('table321_shoeSize')}">

         <h:outputText value="#{x1.shoeSize}" />

        </rich:column>

      </rich:columnGroup>

      </rich:dataTable>

       

      The action is called, but the repainting doesn't work. There is no calling of y.getSortingOrder().

       

      Thanks for any help!