Has anyone used new Drag and Drop feature with 2.4?  I have it work
all fine except the string data set on the event in DragStartHandler
is not passed to the event in other handlers.  getData always returns
null.

                navLabel.getElement().setDraggable(Element.DRAGGABLE_TRUE);
                navLabel.addDragStartHandler(new DragStartHandler() {

                        @Override
                        public void onDragStart(DragStartEvent event) {
                                event.setData("text", navContent.getId()); //I 
want to pass the
obejct id

                                navLabel.addStyleName("s-ContentTOCItem");
                                
event.getDataTransfer().setDragImage(navLabel.getElement(),
                                                10, 10);
                                navLabel.removeStyleName("s-ContentTOCItem");
                                String text = event.getData("text"); //Since I 
am getting the null
data in other DnD event, I want to test it here
                                System.out.println("Drag text: "+text); //text 
is null. Data is
not stored.

                        }

                });

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to