jabal
jabal

Reputation: 12347

Putting a GWT widget into an expanded row

I would like to be able to put widgets into the GWT 2.5 expandable table's expanded part. To be clear: I have seen the showcase here: http://showcase2.jlabanca-testing.appspot.com/#!CwCustomDataGrid and saw that when I'm doing an expanded row I can override this method:

private void buildContactRow(ContactInfo rowValue, int absRowIndex,
    CellTableBuilder.Utility<ContactInfo> utility, boolean isFriend);

This looks like a very low-level method. This example shows how to work with TR's and TD's:

TableRowBuilder row = utility.startRow();
TableCellBuilder td = row.startTD();

I would like to place widgets into my expanded row. Do you have any idea how to do it? I thought of rendering a <div id="foobar"/> into the cell and getting this div from the DOM and putting a widget inside, but I'm afraid of that a div inside a widget (the table) cannot be used this way.

Update:

As you can see the question is not bound to the (still unreleased GWT 2.5). In general I'm looking for a solution for bindig a widget into a Cell being just rendered at the lowest level, e.g. DOM being built as String.

Upvotes: 3

Views: 718

Answers (1)

jabal
jabal

Reputation: 12347

My final solution was implementing a VerticalPanel based table, where each row is a HorizontalPanel. This looks like a table, but is very easy to change the row widget to an ExpandablePanel with any content in it. As I do not need to handle huge data sizes (because I use paging) this solution was very quick. I made its API similar to GWT CellTable so it was easy to use.

Upvotes: 1

Related Questions