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

Error in AbstractInsertPanelDropController #191

Open
loresarti74 opened this issue Nov 30, 2015 · 0 comments
Open

Error in AbstractInsertPanelDropController #191

loresarti74 opened this issue Nov 30, 2015 · 0 comments

Comments

@loresarti74
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant