I've gone a slightly different way.

...
HTMLTable tblDetails = new Grid(2, 2);
tblDetails.getElement().setInnerHTML(innerHtml);
FocusPanel fPanel = new FocusPanel(tblDetails);
TableFocusHandler handler = new TableFocusHandler();
fPanel.setTabIndex(4);
fPanel.addFocusHandler(handler);
vPanel.add(fPanel);
...

class TableFocusHandler implements FocusHandler {
  public void onFocus(FocusEvent focusEvent) {
    tblDetails.setText(0, 0, "Test");
  }
}

If I exclude the "setInnerHTML" line, everything seems to work fine, as in
the (0,0) cell has its text set to "Test" as the handler says. If I put in
the "setInnerHTML" line, it seems to decouple the cells from the table.


On Thu, Mar 11, 2010 at 8:31 AM, Paul Stockley <[email protected]> wrote:

> Try changing you new class to take a HTML string as an argument. Then
> create a TableElement in the constructor, call setInnerHTML on this
> element. Then pass this to setElement on the widget. Then you should
> be able to add the widget to your panel.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
~~~~~~~~~~~~~~~~
My work here is done!
~~~~~~~~~~~~~~~~

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
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.

Reply via email to