title: dynamically select a checkbox for siblings treenode in Smart GWT
body: <p>I have a selectable Tree with checkbox appearance. I need to select all sibling TreeNode on selection of a specific TreeNode.</p>
  
  <p>I could get all the sibling tree nodes, but I don't know what is the attribute name of TreeNode to make that checkbox selected.</p>
  
  <p>Can anybody help me giving some way to select those nodes.</p>
  
  <hr>
  
  
  
  <pre class="lang-java prettyprint-override"><code>compareGrid.addSelectionChangedHandler(new SelectionChangedHandler() {
  
      @Override
      public void onSelectionChanged(SelectionEvent event) {
          TreeNode node =  (TreeNode) event.getSelectedRecord();
          TreeNode parent = tree.getParent(node);//tree is Tree object
  
          treeGrid.selectRecord(parent);
          TreeNode[] nodes = tree.getAllNodes(parent);
          for(int i=0; i&lt; nodes.length; i++){
              if(!nodes[i].getAttributeAsBoolean("isSelected"))
                  treeGrid.selectRecord(nodes[i]);
              }
          }
      }
  });
  </code></pre>