View Full Version : [FIXED] GXT 2.0 m3: TreeGrid node collapse NullPointerException

23 Jun 2009, 1:12 AM
Host mode GXT 2.0 m3

If you expand TridGree node and add an item to it, the node fails to close again.

If you press the button before expanding node - works as expected.
If you expand the node first and the press the button you can't collapse it anymore due to NullPointerException at TreeGrid$TreeNode.access$0(TreeGrid.java:56)

TreePanel works correctly in this scenario.

Quick test for the problem: (modify TreeGridExample.java to add a button)

Button addDataButton = new Button();
addDataButton.setText("Add a node");
addDataButton.addSelectionListener(new SelectionListener<ButtonEvent>(){
public void componentSelected(ButtonEvent ce)
List<ModelData> rootItems = store.getRootItems();
ModelData firstRoot = rootItems.get(0);
Music test = new Music("A song that causes trouble", "Test", "Tester");
store.add(firstRoot, test, false);

23 Jun 2009, 1:29 PM
Thanks for the sample code. This is fixed in SVN.