Try this:

<f:facet name="report">
  <t:commandLink value="#{node.description}"
action="#{navigator.nodeSelected}">
     <f:param name="selectedNode" value="#{node.identifier}" />
  </t:commandLink>
</f:facet>

or t:updateActionListener

2007/2/27, Marko Asplund <[EMAIL PROTECTED]>:

hi

I'm having problems figuring out how to determine the selected node in
t:tree2 when a user clicks a node link. Here's what my view looks
like:

<t:tree2 var="node" value="#{navigator.treeModel.treeData}">
  <f:facet name="report">
    <t:commandLink value="#{node.description}"
action="#{navigator.nodeSelected}"/>
  </f:facet>
</t:tree2>

With ADF Faces I could use something like the following piece of code
for getting the selected node:

public NavigatorBacking {
  TreeModel tree;

  public String nodeSelected() {
    if(tree.isRowAvailable()) {
      MyNode n = (MyNode)tree.getRowData();
      // ...
    }
    return "success";
  }
}

How do I do this with t:tree2?

Reply via email to