Results 1 to 4 of 4

Thread: TreeDropTarget throws ClassCastException in showFeedback (Tree / TreeGrid cast)

    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.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    23
    Vote Rating
    0
      0  

    Exclamation 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:

    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();
    The problem that drag source is not a TreeGrid's implementation but rather Tree's one, though both of them have getSelectionModel method.

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    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.

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
      0  

    Default

    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.

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
      0  

    Default

    Fixed in beta 1.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •