PDA

View Full Version : DragEvent on dualListField



jakovdt
10 Sep 2010, 3:19 AM
Hi all,
I'm trying to add a drag listener to a dualListField. I want to set a boolean when DragEnd event is fired. I use this code but it has no effect :

dualSitiList.addListener(Events.DragEnd, new DragListener(){
@Override
public void handleEvent(DragEvent de) {
// TODO Auto-generated method stub
super.handleEvent(de);
hasBeenModif=true;
Log.info("hasBeenModif :"+hasBeenModif);
}
});

where I fall in errore?

sven
10 Sep 2010, 3:22 AM
Teh DualListField does never fire a DragEnd event, where did you find this information?

There is no direct way to get this information when a drag ended. However, when a drag ended, a new item got added to the store. You can add an Store.Add event listtener to your store. This would also cover the case if the buttons where clicked to move the items.

jakovdt
10 Sep 2010, 3:30 AM
Hi sven,
thanks for reply. I thought to use this event because the dualList works with DND.
I'll use a store listener.