在rich:tree中如果想要在页面中初始化tree的展开和选中状态或者在页面更改后返回时保持之前的状态,
可以设置tree的adviseNodeOpened 和 adviseNodeSelected属性。<br />

adviseNodeOpened false false javax.el.MethodExpression

(signature must match
java.lang.Boolean adviseNodeOpened(org.richfaces.component.UITree))
MethodBinding pointing at a method accepting an
org.richfaces.component.UITree with return of java.lang.Boolean type.
If returned value is: java.lang.Boolean. TRUE, a particular treeNode is
expanded; java.lang.Boolean.FALSE, a particular treeNode is collapsed;
null, a particular treeNode saves the current state
adviseNodeSelected false false javax.el.MethodExpression

(signature must match
java.lang.Boolean adviseNodeSelected(org.richfaces.component.UITree))
MethodBinding pointing at a method accepting an
org.richfaces.component.UITree with return of java.lang.Boolean type.
If returned value is: java.lang.Boolean. TRUE, a particular treeNode is
selected; java.lang.Boolean.FALSE, a particular treeNode is unselected;
null, a particular treeNode saves the current state

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注