0 Replies Latest reply on Jul 30, 2008 12:22 PM by Christoph Schaab

    sorting doen't work in scrollableDataTable with dynamic colu

    Christoph Schaab Newbie

      Hi,

      I try to get sorting of columns working in a scrollableDataTable with dynamic columns. But so far with out success. The relevant part of the jsp is

      <rich:scrollableDataTable value="#{hello.wines}" var="w" styleClass="table"
       headerClass="tableHeader" rowClasses="evenRow,oddRow" height="300px" width="100%" rows="20"
       sortMode="single">
       <rich:columns value="#{hello.fields}" var="field" sortBy="#{w[field.property]}">
       <f:facet name="header"><h:outputText value="#{field.title}" /></f:facet>
       <h:outputText value="#{w[field.property]}" />
       </rich:columns>
       </rich:scrollableDataTable>
      


      If I click on a column I get the error message
      javax.el.PropertyNotFoundException: Property 'rf1' not found on type com.gpc.webprototype.domain.Wine
       javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
       javax.el.BeanELResolver.property(BeanELResolver.java:267)
       javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
       javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
       com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:168)
       org.richfaces.model.impl.PropertyResolverComparator.compare(PropertyResolverComparator.java:59)
       java.util.Arrays.mergeSort(Arrays.java:1270)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.sort(Arrays.java:1210)
       java.util.Collections.sort(Collections.java:159)
       org.richfaces.model.impl.ListDataModel.loadData(ListDataModel.java:51)
       :
      


      If I use sortExpression instead of sortBy, I get the error message
      javax.el.PropertyNotFoundException: Property '#{w[field.property]}' not found on type com.gpc.webprototype.domain.Wine
       javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
       javax.el.BeanELResolver.property(BeanELResolver.java:267)
       javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
       javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
       com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:168)
       org.richfaces.model.impl.PropertyResolverComparator.compare(PropertyResolverComparator.java:59)
       java.util.Arrays.mergeSort(Arrays.java:1270)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.mergeSort(Arrays.java:1281)
       java.util.Arrays.sort(Arrays.java:1210)
       java.util.Collections.sort(Collections.java:159)
       org.richfaces.model.impl.ListDataModel.loadData(ListDataModel.java:51)
       :
      


      Does anyone know how to solve this issue.

      Thanks

      Christoph