title: Prevent some values of SmartGWT IPickTreeItem to be selected
body: <p>I'm trying to clear the user selected value on a <strong>IPickTreeItem</strong>.</p>
  
  <p>This is the only solution I've found to <strong>restrict the user from selecting some of the Tree root values</strong> (not all).</p>
  
  <p>To be more clear, it seems that calling event.cancel() do not stop the event from bubbling.</p>
  
  <p>Am I doing something wrong ?</p>
  
  <pre><code>TreeNode treenode = new TreeNode("root", new TreeNode("Operation A"),
  new TreeNode("Operation B"));
  
  final DynamicForm dynamicForm = new DynamicForm();
  
  Tree tree = new Tree();
  tree.setRoot(treenode);
  
  final IPickTreeItem pickTreeItem = new IPickTreeItem();
  pickTreeItem.setValueTree(tree);
  pickTreeItem.addChangeHandler(new ChangeHandler()
  {
      @Override
      public void onChange(ChangeEvent event)
      {
          pickTreeItem.clearValue() // Not clearing the value
          pickTreeItem.setValue((String)null) // Not working neither
          event.cancel() // Not seeming to work...
      }
  });
  
  dynamicForm.setItems(pickTreeItem);
  dynamicForm.draw();
  </code></pre>
  
  <p>This is <strong>not working</strong> either :</p>
  
  <pre><code>pickTreeItem.setInputTransformer(new FormItemInputTransformer()
  {
  
      @Override
      public Object transformInput(DynamicForm form, FormItem item,
      Object value, Object oldValue)
      {
          return "Desired New Value (not working)...";
      }
  });
  </code></pre>
  
  <p>This is weird because <strong>it works using an external Button to clear the value</strong> (outside the picktreeitem handler) </p>
  
  <pre><code>Button bt = new Button("click");
  bt.addClickHandler(new ClickHandler()
  {
      @Override
      public void onClick(ClickEvent event)
      {
          pickTreeItem.setValue((Object) null);
      }
  });
  </code></pre>
  
  <h2>Expected behavior</h2>
  
  <p>My Tree :</p>
  
  <p>-aaaa<br>
  ----bbbb<br>
  ----cccc<br>
  -dddd<br>
  ----eeee<br>
  ----ffff<br></p>
  
  <p>If the user selects "aaaa" the PickTreeItem value should be reverted to the defaultValue ("Choose a value"), optionally inform the user that he cannot pick "aaaa".</p>
  
  <p>The PickTreeItem should accept "dddd" as a valid choosen value.</p>