-
1. Re: Is there a way to reset selection in <rich:tree>
bleathem Jun 12, 2013 12:59 PM (in response to td121136)The VDL doc for the rich:tree
http://docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/tree.html
or if you prefer the API doc for UITree:
both refer to a selection attribute of the tree component that is bound to a Collection<org.richfaces.model.SequenceRowKey>. Try binding that to your backing bean, and setting the collection to empty when you want to reset the selection (followed by a render).
-
2. Re: Is there a way to reset selection in <rich:tree>
td121136 Jun 12, 2013 9:52 PM (in response to bleathem)Thanks Brian, that works in xhtml, but my problem is the UITree was created by backend, in that case how to reset it, i tried used set selection to null during TreeSelectionChangeEvent, but no luck, unfortunatelly the setSelection() only accept Collection parameter, if it can work with ValueExpression then my problem might be solve
-
3. Re: Is there a way to reset selection in <rich:tree>
td121136 Jun 12, 2013 11:36 PM (in response to td121136)Hi Brian, i had solved my backend issue by using the value expression as follow:
String str = "#{manager.selectionKeys}";
ValueExpression keys = Expressions.instance().createValueExpression(str).toUnifiedValueExpression();
tree.setValueExpression("selection", keys);
Thanks for help!