开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜