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
    pete_by is on a distinguished road

      0  

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

    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 - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      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
    darrellmeyer is on a distinguished road

      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
    darrellmeyer is on a distinguished road

      0  

    Default


    Fixed in beta 1.