This content has been marked as final.
Show 1 reply
-
1. Re: rich:tree componentState attribute not working
ilya_shaikovsky Mar 13, 2009 8:12 AM (in response to khisanthmagus)can't confirm. just added the same property to the demosite bean and defined the component state. both getters and setters called while submit and nodes switching
<h:form> <rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}" componentState="#{userBean.state}"> <rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer.gif"> <h:outputText value="#{item.name}" /> </rich:treeNode> <rich:treeNode type="album" iconLeaf="/images/tree/disc.gif" icon="/images/tree/disc.gif"> <h:outputText value="#{item.title}" /> </rich:treeNode> <rich:treeNode type="song" iconLeaf="/images/tree/song.gif" icon="/images/tree/song.gif"> <h:outputText value="#{item.title}" /> </rich:treeNode> </rich:tree> <a4j:commandButton value="click" /> </h:form>
TreeState state; public TreeState getState() { System.out.println("UserBean.getState()"); return state; } public void setState(TreeState state) { System.out.println("UserBean.setState()"); this.state = state; }