PDA

View Full Version : [FNR] ListView indicates dragging when no drag took place



javajunkie
21 Sep 2010, 7:55 AM
When a ListView contains more elements than fit in the view (a scrollbar is visible) and one or more elements inside the ListView are selected.
The user scrolls using the bar holding down mousekey, then letting loose the mousekey inside the ListView the Dragging statustext is shown, actually having startet a DragEvent for some reason. Pressing leftmousekey on a DropTarget finalizes the the DND operation and drops the selected elements from the ListView.
Worse yet: if its a Move-Operation the dropped element can be dropped multiple time. The selection on the DragSource doesnt get unselected - its removed from the list, but still available for the Dnd management.

I have noticed the statustext indication on Duallists before, now i found this occurs in normal Listviews too.

OS: Windows7 Professional (64bit)
GXT: 2.2.0
IE8
Hostedmode & Webmode

(seems to work on firefox 3.6)



public class Test implements EntryPoint {
public void onModuleLoad() {
Window window = new Window();//
window.setSize(800, 600);
window.setLayout(new FillLayout());
window.add(new MainPanel());
window.layout();
RootPanel.get().add(window);
}

class MainPanel extends HorizontalPanel {
public MainPanel() {
final String DISPLAY_PROPERTY = "name";
ListStore<ModelData> liststore = new ListStore<ModelData>();
final ListView<ModelData> list = new ListView<ModelData>(liststore);
list.setSize(200, 100);
list.setDisplayProperty(DISPLAY_PROPERTY);
ListViewDragSource _listDragSource = new ListViewDragSource(list);
for (int i = 0; i<20; i++) {
ModelData model = new BaseModelData();
model.set(DISPLAY_PROPERTY, Math.random());
liststore.add(model);
}
ListStore<ModelData> liststore2 = new ListStore<ModelData>();
final ListView<ModelData> list2 = new ListView<ModelData>(liststore2);
list2.setSize(200, 100);
list2.setDisplayProperty(DISPLAY_PROPERTY);
ListViewDropTarget _listDropTarget = new ListViewDropTarget(list2);
add(list);
add(list2);
}
}
}

sven
21 Sep 2010, 8:31 AM
This is an issue in all DragSources. I will reply here when it got fixed in SVN. Thanks for the report.

sven
21 Sep 2010, 9:57 AM
Fixed in SVN as of revision 2239

micgala
22 Sep 2010, 1:50 AM
Sven. I noticed that the same happened when you try to resize a Grid column.
A drag indicator was shown.

Do you know if that was also fixed?

sven
22 Sep 2010, 2:05 AM
I tried to reproduce that but was not able to. Maybe you can also try it out against #2239

javajunkie
30 Sep 2010, 5:40 AM
Fixed in SVN as of revision 2239

Doesnt work for me in rev. #2247. Drag indicator remains. Fixed _ONLY_ in 2239?

Had trouble building though.
I used GWT 2.0.4 and changed buildscript to ignore nonpresence of gwt-dev-windows.jar; build.properties seems outdated (gxt.version=2.1.0 ?).

sven
30 Sep 2010, 5:44 AM
Is it possible you checkout trunk? If you look at the history of the revision 2239 you will see that this change was made in "releases/2.2". You also wont have your buildproblems than.

javajunkie
30 Sep 2010, 6:20 AM
sry; works fine.
thx.