-
29 Nov 2011 12:21 PM #1
TreeDropTarget throws ClassCastException in showFeedback (Tree / TreeGrid cast)
TreeDropTarget throws ClassCastException in showFeedback (Tree / TreeGrid cast)
When a tree used as source and target widget in drag and drop operation, showFeedback may throw ClassCastException: cannot cast Tree to TreeGrid.
The problem lines are the following:
The problem that drag source is not a TreeGrid's implementation but rather Tree's one, though both of them have getSelectionModel method.Code:if (item != null && event.getDropTarget().getWidget() == event.getDragSource().getWidget()) { @SuppressWarnings("unchecked") TreeGrid<M> source = (TreeGrid<M>) event.getDragSource().getWidget(); // CCE! List<M> list = source.getSelectionModel().getSelection();
-
30 Nov 2011 3:59 PM #2
Thanks - there are a few other TreeGrid references in that class that don't make sense either. We'll update the thread when we have a fix available.
-
6 Dec 2011 11:30 AM #3
This is fixed in SVN (rev 1969). We have also added reordering tree and treegrid examples to the explorer demo. Changes will go out in our beta release this week.
-
12 Dec 2011 6:54 PM #4
Fixed in beta 1.
Success! Looks like we've fixed this one. According to our records the fix was applied for
a bug in our system
in
a recent build.


Reply With Quote