This content has been marked as final.
Show 5 replies
-
1. Re: How to get data from treeNode
jbuechel Sep 20, 2007 12:16 PM (in response to ratondeau)See:
http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/RichFacesComponentsLibrary.html#recursiveTreeNodesAdaptor
I didn't try it yet (because i'm using JBoss Seam) and actually even haven't known about it. It seems you can use it some how like this:<rich:tree switchType="server" value="#{project.data}" var="item" nodeFace="#{item.type}"> <rich:nodeSelectListener type="demo.ListenerBean"/> ... <!-- Tree nodes --> ... </rich:tree>
public class ListenerBean implements org.richfaces.event.NodeSelectedListener{ ... public void processSelection(NodeSelectedEvent arg0){ //Custom Developer Code ... UrObject object = (UrObject)arg0.getSource(); }
-
2. Re: How to get data from treeNode
jbuechel Sep 20, 2007 1:24 PM (in response to ratondeau)Sorry the last post wasn't completely correctly:
public void processSelection(NodeSelectedEvent nodeSelectedEvent) throws AbortProcessingException { UrObject object = (UrObject)((UITree)nodeSelectedEvent.getSource()).getRowData(); }
-
3. Re: How to get data from treeNode
ratondeau Sep 21, 2007 3:04 AM (in response to ratondeau)It works super duper.
Thanks for the quick answer.
I am not yet completely familiar with all the rich faces components
but now a bit more. -
4. Re: How to get data from treeNode
lmk Sep 21, 2007 4:12 AM (in response to ratondeau)"ratondeau" wrote:
It works super duper.
Thanks for the quick answer.
I am not yet completely familiar with all the rich faces components
but now a bit more.
hello, Id like to do the same thing with suggestionBox;
but I can't get the selected variable on the bean, even using <a4j:actionParam/><rich:suggestionbox id="suggestionCompanyId" for="textCompany" tokens=",[" rules="none" suggestionAction="#{queryBean.autocompleteCompany}" ar="result" fetchValue="#{result.name}" rows="0" first="0" minChars="2" shadowOpacity="5" border="1" width="200" height="150" shadowDepth="0" cellpadding="5" style="background-color:yellow" binding="#{queryBean.mys}"> <a4j:support event="onselect" reRender="client" action="#{queryBean.findClientOf}" ajaxSingle="false"> <a4j:actionparam value="#{result.id}" assignTo="#{queryBean.selectedId}" /> </a4j:support> <h:column> <h:outputText value="#{result.name}"> </h:outputText> </h:column> </rich:suggestionbox>
-
5. Re: How to get data from treeNode
maksimkaszynski Sep 22, 2007 12:27 PM (in response to ratondeau)looks like
http://jira.jboss.com/jira/browse/RF-923