8 Replies Latest reply on Jul 15, 2009 9:11 AM by Andy Stoller

    rich:column  - Attribute sortingOrder and EL

    Andy Stoller Newbie

      Hello World!
      I have a problem with sorting a dataTable (richfaces 3.3.1GA).

      Everything is sorting as it should when I declare the attribute sortOrder (in rich:column) e.g sortOrder="ASCENDING". But as soon as I use EL to declare the attribute sortOrder, the "sorting by click" doesn't work anymore.

      Is this behavior as it should be? Or is it a bug? Have anybody any advice or idea how I could fix this problem?
      This Code works:

      This Code works:

      <rich:dataTable value="#{tableRows}" var="currentRow" rowKeyVar="index">
       <c:forEach items="${headerCells}" var="header" varStatus="loop">
       <rich:column sortOrder="ASCENDING" sortBy="#{currentRow.sortableValue}">
       <f:facet name="header">
       <h:outputText value="#{header.value}" />
       </f:facet>
       <h:outputText value="#{tableRows[loop.index].value}" />
       </rich:column>
       </c:forEach>
      </rich:dataTable>

      This Code doesn't work (only line 3 isn't equal):
      <rich:dataTable value="#{tableRows}" var="currentRow" rowKeyVar="index">
       <c:forEach items="${headerCells}" var="header" varStatus="loop">
       <rich:column sortOrder="#{header.sortOrder}" sortBy="#{currentRow.sortableValue}">
       <f:facet name="header">
       <h:outputText value="#{header.value}" />
       </f:facet>
       <h:outputText value="#{tableRows[loop.index].value}" />
       </rich:column>
       </c:forEach>
      </rich:dataTable>