Hi,
In my application, instead of presenting a user with a SelectOneMenu like this ...
<h:selectOneMenu value="#{company.tradingActivity}" required="true">
<s:selectItems value="#{companyTradeActivityList.resultList}"
var="act"
label="#{act.tradeActivityName}"
noSelectionLabel="Please Select ..."
hideNoSelectionLabel="true" />
<s:convertEntity />
</h:selectOneMenu>
I would like to present the user with a tree control instead, but still using <s:convertEntity/> and the automatic validation, and automatic assignment to company.tradingActivity.
I am able to generate the tree control succesfully like this ...
<rich:tree switchType="client">
<rich:recursiveTreeNodesAdaptor roots="#{tradeGroupList.resultList}"
nodes="#{dir.tradeGroups}"
var="dir">
<rich:treeNode>#{dir.tradeGroupName}/</rich:treeNode>
<rich:treeNodesAdaptor nodes="#{dir.tradeActivities}" var="act">
<rich:treeNode>#{act.tradeActivityName}</rich:treeNode>
</rich:treeNodesAdaptor>
</rich:recursiveTreeNodesAdaptor>
</rich:tree>
I am just not sure how to bind the selected node to the company.tradingActivity field in the company object.
I am using Richfaces 3.2.0, JBoss 4.2.2, facelets, Seam 2.0.1
I have tried to post what I think is relevant information, but as this is my first post please be gentle :-)
Thanks,
Malcolm