1 Reply Latest reply on Jun 20, 2014 2:58 AM by liuliu

    treeNode expanded="${backingBean.shouldExpand(currNodeVar)}" - how to call a method with argument?

    jjakub

      Facelet works fine in tomcat8, but in wildfly8 (jboss8) I get stack trace on first click of expand tree node icon.

      <jsf.version>2.1.13</jsf.version> with <scope>provided</scope>

      <org.richfaces.version>4.3.7.Final</org.richfaces.version>


      following facelet fragment:

      <rich:tree  id="tree" value="#{categoryBean.categoryNodes}" var="categName"   prependId="true" selectionType="ajax" toggleType="ajax" >

        
      <rich:treeNode  prependId="true"
        
      expanded="#{carelineBean.shouldExpandTree(categName)}"
        
      toggleListener="#{carelineBean.expandNode(categName)}"  >
        
      <h:outputText value="#{categName}" />
        
      </rich:treeNode>

      </rich:tree>  

      in jboss at first click on expand icon I get stack trace:

      [Server:server-one] Caused by: javax.el.PropertyNotWritableException: /editCall.xhtml @88,156 expanded="#{carelineBean.shouldExpandTree(categName)}": Illegal Syntax for Set Operation [Server:server-one] at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:136)

      [Server:server-one] at org.richfaces.component.AbstractTree.broadcast(AbstractTree.java:301)

      [Server:server-one] ... 50 more

      [Server:server-one] Caused by: javax.el.PropertyNotWritableException: Illegal Syntax for Set Operation

       

      the next click successfully expands tree branch without stack trace

       

      The doc of expanded states:

       

      Determines if this tree node is expanded. When EL expression used, it should use request-scoped variable with name defied in tree attribute 'var' which points to current node.

       

      How can I decide if node should be expanded in method of backing bean, method must know the current node which should be expanded?

      Why is it working right in tomcat, but not in wildfly ?