GWT draggable CellTable cells - gwt

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.
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.

Take a look at GwtQuery drag and drop plugin. It offers drag and drop support for CellWidget
Documentation : http://code.google.com/p/gwtquery-plugins/wiki/DragAndDropPluginForGWTDeveloppers
Example wit CellTable : http://gwtquery-plugins.googlecode.com/svn/trunk/droppable/demo/CellTableSample/CellTableSample.html

Related

How to create an expandable row in gwt

As seen on the right, I want to create an expandable row. I am confused how to use TableCellBuilder and/or buildContactRow.
Could someone give me any pointers or point me to a tutorial
I am thinking of using a disclosure panel.
You can use Disclosure panel(perfomance is good).
In my project i have tried TableCellBuilder with cell table but not works what i expected.
Using Disclosure panel you can enable animation also. I have created more that 300 Disclosure panel at a single hit dynamically data from mysql db. but it works fine. so perfomance and efficient is faster in UI.

How to drag&drop row from one CellTable to another using GWTquery?

I'm following the example about DragAndDropCellTable in GWTQuery example where the drop target is a CellList. What i need to do is Drag a CellTable row and Drop it in another CellTable. Is it possible? Any Pointers? I'm using GWT2.4

How to merge table cells in Eclipse RCP Table control?

My question is: I've an Eclipse RCP table in my view. The table has gridlines Visible and everything is fine. But I want all the cells of first row of the table to be merged as a single row in run-time GUI. How can I achieve this functionality ? Please, I don't expect something like adding a text over the first row obstructing it. If any API level functionality or any clues to do this are welcome.
The swt table is a native widget and does not allow you any span, neither in columns nor in rows. Even OwnerDraw (custom cell rendering) does not support this. The only way I see that could allow you to achieve this kind of hack is the swt table editor which allows you to place controls above cells:
http://www.eclipse.org/swt/snippets/#tableeditor
The table editor tracks the position of single cells and positions controls above them. It hides controls when a cell is not in edit mode, show's them when the cell is in edit mode. You'd have to deactivate this default behavior and make sure the controls are always shown - this should be fairly easy.
The more challenging part would be that you'd have to find out how to place the controls above 2 or more (and not a single) cells.
The only swt control I know to support span is the nebula grid. Grid is a custom control (no native widget) and therefore offers far more possibilites.
http://eclipse.org/nebula/widgets/grid/grid.php
http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.swt.nebula/org.eclipse.swt.nebula.snippets/src/org/eclipse/swt/nebula/snippets/grid/GridSnippet2.java?root=Technology_Project&view=co
u can use GC api to do the needs in table. u can span between two columns.
http://www.java2s.com/Tutorial/Java/0280__SWT/Maketextspanmultiplecolumns.htm

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.

Code for hooking popup to update column values in gwt-incumbator pagging scroll table

Hie
the demo shows you can click on any column and update the value.
can someone share the code how it has been implemented?
Hi You can use GwtExt or SmartGWT Editable grid and it also gives components for implementing Paging in it.
link to editable grid in GwtExt is here
You can also find paging that is also local and remote both