-
1. Re: rich:tree and JSF lifecycle
jsoye Sep 13, 2011 6:23 AM (in response to jsoye)Sorry,
I should have added that I'm using
- Richfaces 4.1.0.20110805-M1
- JBoss AS 7 Final
- Seam 3.0.0.Final
-
2. Re: rich:tree and JSF lifecycle
jsoye Sep 16, 2011 12:28 PM (in response to jsoye)Gotcha. Took a break for a few days and moved onto something else. Returned afresh (not really!) and tried a slight variation. Works this way.
Here's my approach for those interested. Might save you from the headaches it caused me.
<rich:tree id="myTree" var="node" nodeType="#{node.type}" value="#{myBean.treeNodes}"
toggleType="client" selectionType="ajax">
<rich:treeSelectionChangeListener for="myTree" listener="{myBean.nodeTreeSelectionChanged}"/>
<rich:treeNode type="CATEGORY_1" iconExpanded="...png" iconCollapsed="...png">
<a4j:outputPanel>
<h:outputText value="#{node}" />
<a4j:ajax event="click" render="gridPanel"/>
</a4j:outputPanel>
</rich:treeNode>
<rich:treeNode type="CATEGORY_2" iconExpanded="...png" iconCollapsed="...png">
<a4j:outputPanel>
<h:outputText value="#{node}" />
<a4j:ajax event="click" render="gridPanel"/>
</a4j:outputPanel>
</rich:treeNode>
</rich:tree>
I thought I had tried this approach before, but obviously I missed something. C'est la vie.