1 Reply Latest reply on Dec 9, 2010 10:28 AM by leniviy

    bad sorting with <rich:column sortOrder="#{foo}>

    leniviy

      Hi! If I specify sortOrder for a column as a plain constant ("ASCENDING", "DESCENDING" or "UNSORTED"), all fine: a click on a header actually cycles the sort order and the sort icon.

      But if I use a variable, ui:param or even "#{'ASCENDING'}" instead of  "ASCENDING", it sorts once, but a click on header won't change the sort  order.

      It's in 3.3.3.Final .


      <rich:dataTable width="300px" value="#{testBean.testList}" var="entry" id="table">
        <f:facet name="header">
            <rich:columnGroup>
                <rich:column>
                    <h:outputText value="id" />
                </rich:column>
                <rich:column >
                    <h:outputText value="value"/>
                </rich:column>
            </rich:columnGroup>
        </f:facet>
          <rich:column filterBy="#{entry.id}" sortBy="#{entry.id}" sortOrder="#{'DESCENDING'}">
            #{entry.id}
          </rich:column>
          <rich:column filterBy="#{entry.value}" sortBy="#{entry.value}">
            #{entry.value}
          </rich:column>
      </rich:dataTable>

       

      Is it a bug or a mistake in my code? If bug, is there a goog workaround?