PDA

View Full Version : [CLOSED] Removing a TreeModel one-level below Root gives Exception



Kutu
4 Jun 2008, 9:10 AM
Please see the following bug: http://extjs.com/forum/showthread.php?t=37557

1) Add a lone TreeModel to the Root (via initialization code).
2) Remove the lone TreeModel.

I suspect this happens because the TreeModel has already set the Parent to NULL before executing the TreeItem.remove() code.

Result:

[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.tree.TreeItem.remove(TreeItem.java:384)
at com.extjs.gxt.ui.client.viewer.TreeTableViewer.remove(TreeTableViewer.java:236)
at com.extjs.gxt.ui.client.viewer.ModelTreeContentProvider$1.modelChanged(ModelTreeContentProvider.java:85)
at com.extjs.gxt.ui.client.data.ChangeEventSupport.notify(ChangeEventSupport.java:33)
at com.extjs.gxt.ui.client.data.BaseModel.notify(BaseModel.java:93)
at com.extjs.gxt.ui.client.data.BaseTreeModel.notify(BaseTreeModel.java:126)
at com.extjs.gxt.ui.client.data.BaseModel.fireEvent(BaseModel.java:135)
at com.extjs.gxt.ui.client.data.BaseTreeModel.remove(BaseTreeModel.java:152)
at com.thatone.gwt.example.widget.tree.TreeTableViewerPage$7.componentSelected(TreeTableViewerPage.java:176)
at com.extjs.gxt.ui.client.event.TypedListener.handleEvent(TypedListener.java:48)

darrellmeyer
4 Jun 2008, 9:34 PM
Viewers have been removed from GXT and are not supported. You should move to the current release.