I understand that its no longer there. I was trying to give you an alternate way to do what you want. getNode() is not coming back so you will need to adapt.
Reread my last answer again. Basically you use the binding attribute of tree2 to bind a reference to the tree to your backing bean. (The binding attribute is common to most components and this strategy is described in lots of JSF books.) Once you have a reference to the tree in your backing bean, your selectedNode() method can just ask the tree what the current node is. Sean On 5/30/06, Daniel Haensse <[EMAIL PROTECTED]> wrote:
Hi Sean, thanks for the quick reply. I don't understand your answer :-( My problem is that getNode() does not exist anymore in class TreeModelBase. Eclipse claims that "The method getNode() is undefined for the type TreeModelBase" in the line this.selectedNode = this._treeModel.getNode(); (see class abstract below) Before the update of the tomahawk library everything worked fine :-( When I dig in the source code repository of the tree2 implementation, I can see that TreeModelBase has no getNode() function. old code worked fine before update: public class MainScreenView { private TreeModelBase _treeModel = null; private TreeNode selectedNode; public TreeModel getTreeData() { // Create tree if TreeModel is null if (_treeModel == null) { ... create tree } return _treeModel; } public String selectedNode() { this.selectedNode = this._treeModel.getNode(); return ("main"); } } <t:tree2 id="serverTree" value="#{mainScreenView.treeData}" var="node" varNodeToggler="t" clientSideToggle="false"> <f:facet name="location-folder"> <h:panelGroup> <h:commandLink immediate="true" actionListener="#{t.setNodeSelected}" action="#{mainScreenView.selectedNode}"> ... rendered elements removed </h:commandLink> </h:panelGroup> </f:facet> regards Dani