1 Reply Latest reply on Jul 16, 2009 4:38 AM by Ilya Shaikovsky

    Can i show my treeNode open?

    Rafael Duque Newbie

      i need display my treeNode open, if it's checked.
      I am using TreeNodeImpl and i created the follow object:

      public class SelectedObject {
       private String id;
       private String name;
       private boolean selected = false;
       public String getId() {
       return id;
       public void setId(String id) {
       this.id = id;
       public String getName() {
       return name;
       public void setName(String name) {
       this.name = name;
       public boolean isSelected() {
       return selected;
       public void setSelected(boolean selected) {
       this.selected = selected;

      I'm using this object:
      TreeNodeImpl<SelectedObject> tree = new TreeNodeImpl<SelectedObject>();

      and using the boolean atributte for checkbox in the xhtml code:

      <rich:tree id="tree" switchType="client" value="#{permissaoUsuarioManagedBean.raiz}" var="node">
       <rich:treeNode icon="/../icons/unidade.gif" iconLeaf="/../icons/empresa.gif" >
       <h:selectBooleanCheckbox value="#{node.selected}"
       <f:param id="id" name="id" value="#{node.id}"/>
       <h:outputText value="#{node.name}"/>

      I must show this component open if it's node was checked (true).

      Can i show this component open when the page is rendered?

      I didn't find any property in the treeNode component, is possible do it?