There's a lot lacking in FlexTable. If you need <th>, <thead>, etc. I think
you need CellTable or DataGrid. They extend AbstractCellTable which (from
looking at the code) includes all that. The javadoc's say you can add
custom Header's that take events. (I've scant experience with
the com.google.gwt.user.cellview.client package. It's a challenge.)
On Thursday, August 16, 2012 8:55:52 AM UTC-4, Dennis Haupt wrote:
>
> i'm trying to add widgets into a flextables header. the header itself
> required me to add native th / tr elements and add my widgets there:
> if (model.header().totalHeaderRowCount() > 0) {
> final Element head = DOM.createElement("thead");
> for (final int headerRowIndex :
> CollectionFunctions.range(model.header().totalHeaderRowCount())) {
> final Element headerRow = DOM.createElement("tr");
> DOM.appendChild(head, headerRow);
> for (int col = 0; col < totalColumnCount; col++) {
> final HeaderCell cell = model.header().cellAt(headerRowIndex, col);
> final Widget widget = createWidget(cell.asTableCellContent());
> final Element th = DOM.createTH();
> DOM.setElementAttribute(th, "colSpan", String.valueOf(cell.colSpan()));
> col += cell.colSpan() - 1;
> DOM.appendChild(th, widget.getElement());//<-- important line
> DOM.appendChild(headerRow, th);
> }
> DOM.insertChild(grid.getElement(), head, 0);
> }
> }
>
> everything works, except for events. they seem to get lost somewhere and
> don't reach the listeners anymore.
> how can i fix it?
>
--
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/-/sebYkE_GXj4J.
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.