Re: GWT draggable CellTable cells

2012-06-14 Thread js
Hi,

I faced same problem. I set draggable to true on cellTable.getElement() and 
added DragStartHandler to CellTable. This works. 

cellTable.getElement().setDraggable(Element.DRAGGABLE_TRUE);
cellTable.addDomHandler(new DragStartHandler() {...});

I can drag selected rows (with help of selection model), 
update drag helper with:

DragStartEvent.getDataTransfer().setDragImage(
dragPanel.getElement(),
10, 10
);

What does not work for me is to add drop handler on CellTable.
I can do this:

callTable.addDomHandler(
new DropHandler() {
@Override
public void onDrop(final DropEvent event)
{
// do something
}
},
DropEvent.getType()
);

but handler never gets called. I've tried to wrap it in FocusPanel but with 
no success.

If I add drop handler to e.g. Label it works but with CellTable I doesn't.

Does anybody have an idea what's the problem

regards
Jiri

On Thursday, January 5, 2012 3:01:12 PM UTC+1, vinnie wrote:

 I have a GWT CellTable - it's a pretty simple table with just a single 
 string column. 

 What I'd like to do is drag rows of this table to a drop target 
 (actually another table). I've been trying to figure out how to attach 
 a draggable event as described at ~23:00 of this video (http:// 
 www.youtube.com/watch?v=KEkR1ox_K10). 

 To which CellTable element can I set the draggable flag to TRUE. 

 I haven't gotten this far yet, but I'm sure I'll soon face a similar 
 issue in setting the drop handler on the target table. 

 If someone could post an example or point me in the right direction, 
 I'd be grateful.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/umVTgeZ0SvoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT draggable CellTable cells

2012-01-05 Thread vinnie
I have a GWT CellTable - it's a pretty simple table with just a single
string column.

What I'd like to do is drag rows of this table to a drop target
(actually another table). I've been trying to figure out how to attach
a draggable event as described at ~23:00 of this video (http://
www.youtube.com/watch?v=KEkR1ox_K10).

To which CellTable element can I set the draggable flag to TRUE.

I haven't gotten this far yet, but I'm sure I'll soon face a similar
issue in setting the drop handler on the target table.

If someone could post an example or point me in the right direction,
I'd be grateful.

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



Re: GWT draggable CellTable cells

2012-01-05 Thread Jeff Larsen
take a look at gwtquery and the dnd plugin for it. 

http://code.google.com/p/gwtquery/ 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_GR_GcfgWrEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.