rsideb
rsideb

Reputation: 829

RichFaces Tree with inline text and controls

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?

Upvotes: 0

Views: 778

Answers (1)

Bozho
Bozho

Reputation: 597114

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.

Upvotes: 1

Related Questions