Store a reference to your tree in your backing bean with:

<t:tree2 id="foo" ... binding="#{treeBacker.tree}">

Then in your action method you have

public String selectedNode()
{
    this.selectedNode = tree.getNode();
    return("main");
}

The tree always knows the current node when processing an event (much
like a data table knows the current row.)

Sean

On 5/27/06, Daniel Haensse <[EMAIL PROTECTED]> wrote:
Dear list,

with tomahawk 1.1.2 in tree2 the getNode() member function is no longer
implemented in the class TreeModelBase.

Is their a work around, I would like to get the user selected item of the
tree, currently I placed a
action="#{mainScreenView.selectedNode}" as commandLink on each item.

Then I catch the action with

 public String selectedNode() {
   this.selectedNode = this._treeModel.getNode();
   return("main");
  }

Any hints? Why was this removed?

best regards

Dani

Reply via email to