In Beehive, the variables being bound to for all expressions must be properties and not member variables in the page flow.
BTW, in Beehive the framework sill take care of selection/expansion for you if you bind to the same tree variable from request to request. On 4/23/05, Srini <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying out an example with the <netui:tree> and <netui:treeItem> and > <netui:treeLabel> tags > > I am getting the following error > > Caught exception when evaluating expression "{session.myTree}" with available > binding contexts [actionForm, pageFlow, globalApp, request, session, > application, pageContext, bundle, container, url, pageInput]. Root cause: > java.lang.RuntimeException: Can not evaluate the identifier "myTree" on a > null value object > > I am trying to use the same example that is given in the documentation of > netui:tree tag > > <netui:tree > dataSource="pageflow.myTree" > selectionAction="treeState" > tagId="myTree"> > <netui:treeItem expanded="true" > > <netui:treeLabel>Root Folder</netui:treeLabel> > <netui:treeItem expanded="false"> > <netui:treeLabel>I</netui:treeLabel> > <netui:treeItem expanded="false"> > <netui:treeLabel>A</netui:treeLabel> > <netui:treeItem>1</netui:treeItem> > <netui:treeItem>2</netui:treeItem> > </netui:treeItem> > </netui:treeItem> > </netui:treeItem> > </netui:tree> > > Here is the code in controller.jpf > > public Forward treeState() { > TreeElement rootNode = this.getMyTree(); > String selectedNode = null; > String expandedNode = null; > selectedNode = getRequest().getParameter(TreeElement.SELECTED_NODE); > expandedNode = getRequest().getParameter(TreeElement.EXPAND_NODE); > if (expandedNode != null) { > TreeElement node = rootNode.findNode(expandedNode); > if (node != null) { > node.setExpanded(!node.isExpanded()); > } > return new Forward("tree"); > } > return new Forward(selectedNode); > } > > I have "myTree" variable of type TreeElement in the controller. > > I think an example of netui:tree on the beehive site will be very very > helpful. > > Thanks > Srini > >