0 Replies Latest reply on Jul 21, 2008 2:46 AM by Victor Bucutea

    create a filterExpression for dataTable Programatically

    Victor Bucutea Newbie

      Hi ,


      My problem is that if I try to create a value expression like

      Boolean b = (Boolean) JSFUtil.createValueExpression("${fn:startsWith(produs.atributAditional"+i+
       ", produsFilter.atributAditional"+i+")}", Object.class).getValue(FacesContext.getCurrentInstance().getELContext());


      i get the following exception in the a4j log :

      javax.faces.event.AbortProcessingException: /produse/gestionareProduse.jsp(299,2) '#{gestionareProdusePageBean.changeMainTable}' javax.el.ELException: Function 'fn:startsWith' not found
       at org.apache.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:171)
       at org.apache.el.parser.SimpleNode.accept(SimpleNode.java:129)
       at org.apache.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:133)
       at org.apache.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:147)
       at org.apache.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:190)
       at org.apache.el.ExpressionFactoryImpl.createValueExpression(ExpressionFactoryImpl.java:68)
       at ro.msf.jsf.utils.JSFUtil.createValueExpression(JSFUtil.java:97)
      



      the irony of this is that if i put a jstl tag with the same specific jstl function :

      <c:if test="${fn:containsIgnoreCase('Java xxx','Java')}" >
       dsfsdfsdfsdfds
       </c:if>
      


      it works fine .

      Any ideas why that happens ?


      Thanks for reading ,

      Victor