satish
satish

Reputation: 297

automatically expand a tree on loading the body

Hi all Iam new to JSF technology how to automatically expand the tree on loading the page in by using rich:tree tag.

<rich:tree switchType="client"
value="#{Bean.deviceServiceTreeRoot}" var="item">
<rich:treeNode>
<h:commandLink value="#{item.name}"
action="#{Bean.getLink()}"
style="color:blue;text-decoration:none;"
title="#{item.Description}">
<f:param name="productIDs" value="#{item.ID}"></f:param>
</h:commandLink>
</rich:treeNode>
</rich:tree>

Now by using the above code i can display a tree structure.The above is present in one page After clicking on submit button it will redirect to another page In that page I need to have the tree in expanded mode How can I achieve that Is that possible?

Upvotes: 3

Views: 1868

Answers (1)

Marko Jurisic
Marko Jurisic

Reputation: 854

<rich:treeNode expanded="#{true}">

has done the trick for me

Upvotes: 1

Related Questions