This content has been marked as final.
Show 4 replies
-
1. Re: Event Tree Expand..
nightiger Sep 20, 2007 7:28 AM (in response to nightiger)Correction :
I want to "modify" the Nodes in this function! * -
2. Re: Event Tree Expand..
maksimkaszynski Sep 20, 2007 11:55 AM (in response to nightiger)I'm still uncertain, what is that you need.
Could you please explain in detail.
And attach the code snippet as well. -
3. Re: Event Tree Expand..
nightiger Sep 20, 2007 1:12 PM (in response to nightiger)My Tree initially without nothing inside
<rich:tree style="width:10px" ajaxSubmitSelection="true" switchType="ajax" value="#{treeBean.data}" var="item" n odeFace="#{item.type}"> <rich:treeNode changeExpandListener="#{treeBean.evtExpand}" type="negocioTO" icon="/images/email.gif" iconLeaf="/images/email.gif"> <h:outputText id="primeiro" value="#{item.label}" /> </rich:treeNode>
Event = changeExpandListener !!!
Code that goes in the data base to make a consultation, and places icons in tree ! (Event changeExpandListener)public String evtExpand(NodeExpandedEvent event){ ItemFuncaoB = new TreeImpl(); ItemFuncaoB.setLabel("iconnnnn"); ItemFuncaoB.setParent(funcao); ItemFuncaoB.setType("icone"); funcao.addChilImpl("naotemId", ItemFuncaoB); }
funcao = child of tree !
The problem is that it alone enters in the function of the event after having passed for ?getChild () and getChildren ()? of ?funcao?!
Then mine tree not dumb nothing! never.
I have that to enter in the function of the event before passing in ?getChild () and getChildren ()? of ?funcao?! -
4. Re: Event Tree Expand..
maksimkaszynski Sep 22, 2007 3:40 PM (in response to nightiger)The simplest way is to define your own TreeNode implementation, and override getChildren method to support lazy loading.