Skip to content
This repository was archived by the owner on Dec 8, 2017. It is now read-only.
This repository was archived by the owner on Dec 8, 2017. It is now read-only.

Error in AbstractInsertPanelDropController #191

@loresarti74

Description

@loresarti74

Hi,
I'm using gwt-dnd in my application and I experienced an error in the method onMove implemented in AbstractInsertPanelDropController.
My drop controller is constituted by a VerticalPanel and it is implemented by means of a VerticalPanelDropController.
The vertical panel is added to an absolute panel A, whereas A is added to a content panel. The height of the content panel is smaller than the height of A, so a vertical scroll bar is added. When the content panel automatically scrolls during the drag operation, the onMove method in the AbstractInsertPanelDropController causes a RunTime error (Null Pointer exception). As a matter of fact, the attribute positioner of the class, that represents the widget that shows the preview of the drag operation, becomes null during the scroll and the call to the method dropTarget.insert(positioner, targetIndex) rises the above error.
Unfortunately, the attribute positioner is private and has no getter. So, in order to fix the bug, I should completely reimplement both AbstractInsertPanelDropController and VerticalPanelDropController, in order to fix the onMove behavior. In my actual implementation, when positioner becomes null, it is recomputed again using the method newPositioner. I don't know exactly if this method is the best one but actually it works.

I hope my submission can be helpful for the mainteinance of the library.

loresarti74

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions