1 Reply Latest reply on Oct 9, 2009 9:30 AM by sebastianfiss

    FilterMethod in composition doesnt work

      Hello,
      I have a problem concerning the filtering of rich:dataTable/column. I am not using the built-in filteredBy, but instead I use external filtering in a Bean via the filterMethod.

      (Using RF 3.3.2)

      my ColumnComposition:
      Explanation: Each table has its own sortBean and filterBean and gets it from a Hashmap in a SessionBean.

      testBean is a managedBean (Scope: session)
      sortMap is a HashMap (key=tableId, value=sortBean)
      filterMap is a HashMap (key=tableId, value=filterBean)
      tableId is set via <c:set var="tableId" value="#{id}"/> (could use id instead, since it is passed by the table-attribute id)

      <ui:composition>
       <rich:column sortOrder="#{testBean['sortMap'][tableId].sortOrder}"
       selfSorted="#{false}"
       filterMethod="#{testBean['filterMap'][tableId].filterMethod}"
       filterEvent="onkeyup"
       id="#{colId}"
       sortBy="#{sortValue}">
       <f:facet name="header">
       <t:panelGrid columns="1">
       <t:outputText value="Title"/>
       <t:inputText value="..." />
       </t:panelGrid>
       </f:facet>
       <ui:insert/>
       </rich:column>
      
      </ui:composition>
      


      Now the following happens when the view is rendered:
      javax.el.PropertyNotFoundException - Target Unreachable, 'null' returned null

      If I replace [tableId] with ['userTable'] in the FilterMethod, assuming my table has the id="userTable", then everything works as it should.

      Now my question is: why can I use the context-variable tableId in my sortOrder-attribute, but why does it resolve to null when used in the filterMethod-EL?

      I assume that there might be a bug behind this. ManagedBeans and Strings work fine in "filterMethod", but view-scoped-variables dont work (resolve to null).

      Thanks in advance,
      sebastian