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);
}
}
}
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);
}
}
}