Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DropHandler and dropped item?

    SmartClient Version: SC_SNAPSHOT-2011-01-06/PowerEdition Deployment (built 2011-01-06) / GWT 1.71.

    IE8

    I am using a pair of VStack for drag and drop. I have a DropHandler registered but during the DropHandler I call VStack.getMembers() and that call does not have the item that has been dropped? Am I using the wrong event? What is the proper event to register to get all Members after the drop is complete?

    #2
    In Drop, the new member has not been added - the Drop event could still be cancelled.

    There's no dedicated event that fires after Drop has completed, but you could use DeferredCommand/Scheduler to wait a trivial amount of time after the event, and the member will then be there.

    Comment


      #3
      Is this still the case?

      A deferred command does slow down the app a bit, and if the user's browser is throttling there's no way of knowing how long to wait. What if there were a handle to a callback? Or if you treated this similar to the onChange onChanged events whereby onChange is "in the act" and can be canceled whereas onChanged is after the fact. Something like onDrop and onDropped? It would be great to know for sure when the drop is complete.

      Comment


        #4
        There's a dropComplete event specifically on DataBoundComponents because such drops can involve multiple server trips.

        For Layout, DeferredCommand can wait an arbitrarily short amount of time, meaning it can basically fire right after the mouseUp event that finishes the drop. There's no way for the user to notice this delay.

        Comment

        Working...
        X