This content has been marked as final.
Show 2 replies
-
1. Re: tree, autosave state?
tkalactomo Aug 24, 2007 4:55 AM (in response to yevgen_78)Hello!
This is the way I have done it:
On jsp page:<r:tree switchType="ajax" binding="#{tree}" value="#{someBean.data}" var="item" nodeFace="#{item.type}">
In the upper code "binding="#{tree}"" is important.
And in your bean:@Name("richTree") @Scope(ScopeType.CONVERSATION) public class RichKatalog implements RichKatalogInterface { /** * */ private static final long serialVersionUID = -259241232787790718L; @In(required=false,create=true) @Out(required=false) private UITree tree;
So you just value binded you tree in the Conversation bean,what means that your tree will save state.
Best regards! -
2. Re: tree, autosave state?
tkalactomo Aug 24, 2007 4:57 AM (in response to yevgen_78)this is also usefull.You can add this methods in your bean too:
public void expandAll() { try { tree.queueExpandAll(); } catch (IOException e) { e.printStackTrace(); } } public void collapseAll() { try { tree.queueCollapseAll(); } catch (IOException e) { e.printStackTrace(); } }
Tree is outjected and injected so this will work too.