views:

187

answers:

1

I have implemented a tree view in RichFaces. Now I want to display data and controls inline with the tree nodes.

For example:

(Root Node)
   |
   ----(Tree Node 1)  (Text and control Here)
   |
   ----(Tree Node 2)  (Text and control Here)
          |
          ----(Tree Node 3)  (Text and control Here)

Here is the (simplified) markup for my tree view:

<rich:tree value="#{TreeBean.tree}" var="node">
    <rich:treeNode>     
        <h:outputText value="#{node}"/>
    </rich:treeNode>
</rich:tree>

What is the best way to accomplish this?

+1  A: 

Well, I guess you can make:

<rich:treeNode>     
     <h:panelGroup>
        <h:outputText value="#{node}"/>
        <h:outputText value="#{text}" />
        <a4j:commandLink .. />
     </h:panelGroup>
</rich:treeNode>

But you can also consider having only one set of controls, outside the tree, which operate on the currently selected tree node.

Bozho
Thanks, I guess it was pretty simple to do...
Brightside