fredsa / gwt-dnd

Library providing easy to use mouse or touch based drag-and-drop capabilities to GWT
43 stars 41 forks source link

FlexTableRowDrxxController do not handle header rows correctly #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of GWT are you using?
1.5.2

What version of the gwt-dnd jar file or library file are you using?
2.5.6

What operating system(s) are you using? Windows? Linux? Mac?
Linux

Does the issue occur in web mode, hosted mode, both or don't know?
both

What browser(s) do you use? Firefox, IE, Safari, other?
Firefox

What is the browser version (if you know) from Help->About?
3

What steps will reproduce the problem? Please attach sample code if you can.
1. In the flextable sample, change the 1st row to not have a widget in
column 0 and display some text (like a row of headings).

2. Run the sample and attempt to drag a row up to the heading.
3. Dropping at that point will fail.

What is the expected output? What do you see instead?
I expect to see the same behavior as if I had dropped in an invalid location.

Do you have a workaround?
Not at the moment, but it seems as if the FlexTableRowDropController should
be aware that not all rows will have widgets and that the top row could be
a header.  It is also possible to have the bottom row setup as a footer.

Original issue reported on code.google.com by hoshp...@gmail.com on 8 Oct 2008 at 11:16

GoogleCodeExporter commented 9 years ago
Attached is a possible change for the FlexTableRowDropController.  I have added 
an
extra constructor to indicate the number of header rows that will be present in 
the
table.  These are used as non-movable rows.  Also, I have added a check for no 
widget
in a row, and provide a dummy widget to allow the rest of the IndexedTable 
processing
to continue.

The fixes appeared to fix my issue, so hopefully it is something that others 
can use
as a starting point to provide a more robust FlexTable drop controller.

Original comment by hoshp...@gmail.com on 9 Oct 2008 at 3:42

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by fredsa on 31 Jan 2012 at 6:11