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:ou开发者_C百科tputText value="#{node}"/>
</rich:treeNode>
</rich:tree>
What is the best way to accomplish this?
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.
精彩评论