2 Replies Latest reply on Jun 14, 2012 12:29 PM by a.zhemoytuk

    Literal value does not work for expanded attribute of rich:treeNode

    a.zhemoytuk

      <rich:treeNode expanded="true">

      has no effect.

       

      https://community.jboss.org/message/626715 recommends to use value expression instead: <rich:treeNode expanded="#{true}">

      but that fails on postback when value is set.

       

      Problem appears to be with AbstractTreeNode class, it saves iterationState by expanded key, overriding expanded property value:

      
      public Object getIterationState() {
          
      return getStateHelper().get(PropertyKeys.expanded);
      
      }
      
      
      
      public void setIterationState(Object state) {
          
      getStateHelper().put(PropertyKeys.expanded, state);
      
      }