Thursday, April 28, 2011

CellTree with CellTable nodes

Hi,

We have to implement a tree that contains some table nodes at third
level(leaf).
To achieve that, I have used a CellTree and a custom cell, which
renders a CellTable (using GWT 2.1).
It worked fine but now we have to make some cells of the CellTable
clickable.
I managed to do it outside of the tree context(standalone table), but
once the table is used inside a tree node, the table's events are not
managed.

Do you have any idea about how I could fix this ?

Notes:

With EventBug(a Firebug extension), I can see that a click handler is
registered on the table element in the first case, while it is not in
the second case (inside the tree).
I have also noticed that the events are sunk in the Widget.onAttach()
method. However that method is invoked only in the first case.


class ATMTableCell extends AbstractCell<List<ATMDTO>> {

// Contains the CellTable
ATMTableWidget atmTable;

public ATMTableCell() {
atmTable = new ATMTableWidget(false);
}

@Override
public void render(com.google.gwt.cell.client.Cell.Context
context, List<ATMDTO> data, SafeHtmlBuilder sb) {

atmTable.setData(data);

sb.append(SafeHtmlUtils.fromTrustedString(atmTable.getElement().getInnerHTML()));

}

}


Thx

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment