-
25 Sep 2012 9:43 PM #1
remove of TreeModel with filtering enabled
remove of TreeModel with filtering enabled
I am using GXT 3.0.1 GPL.
When a filtered tree view deletes a row (for example a user uses a filter field and filters a tree and then selects a row and deletes it) if you call remove( ) on the tree store, in remove( ) it will call "applyFiltersToParents( )" method.
This method assumes there is a parent to the node and fails with a NullPointerException on line 228 since in this case the node is a root node and therefore has a null parent.
Short of subclassing the TreeModel, I am not sure what else I could do here? ideas?
I don't have time right now to post a code example (but will if Sencha is interested in fixing it)
-JasonStamp Image Bursting Application
see http://code.google.com/p/stamp-imagebursting/
-
26 Sep 2012 7:05 AM #2
Good catch - I've now got a unit test demonstrating this issue added to the TreeStore's tests, and will have a fix shortly.
One possible workaround would be to subclass TreeStore.remove to disable filtering and re-enable it after the remove is complete - I have not yet tested this, but it seems as though it should work based on the test case.
-
27 Sep 2012 9:39 PM #3
It does result in some odd visual effects (for example the filter is reapplied but the FilterField has no value).
Stamp Image Bursting Application
see http://code.google.com/p/stamp-imagebursting/
-
2 Oct 2012 8:53 PM #4
This issue has been fixed in SVN and will be available in the next release.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTGWT-2458
in
3.0.2.


Reply With Quote