I get the following exception when I try to set the widget (which is a ExtGWT component - Layout container) using FlexTable setWidget method.

FlexTable sysDetails = new FlexTable();
LayoutContainer wc = new LayoutContainer();
.....
.....
ContentPanel panel = new ContentPanel();
panel.setHeaderVisible(true);
panel.setCollapsible(false);
panel.setAnimCollapse(false);
panel.setHeading(GWTUtils.FixupXmlString(serviceName + " on " + cbsName));
panel.setHeight(140);
panel.setWidth(515);
panel.setLayout(new FillLayout());
panel.add(tbl);
panel.setId(WIDGET_ID + serviceHostPanelId);
wc.setHeight("180");
wc.add(panel, new BorderLayoutData(Style.LayoutRegion.NORTH) );
wc.setBorders(true);
sysDetails.setWidget(0,1,wc);

-------------------------------------------

Exception from stacktrace:

[FATAL] Uncaught Exception:
com.google.gwt.core.client.JavaScriptException:
(TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:443)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:215)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.dom.client.Node$.removeChild$(Node.java)
at com.google.gwt.user.client.DOM.removeChild(DOM.java:984)
at com.google.gwt.user.client.ui.HTMLTable.remove(HTMLTable.java:992)
at com.google.gwt.user.client.ui.Widget.removeFromParent(Widget.java:65)
at com.extjs.gxt.ui.client.widget.Component.removeFromParent(Component.java:679)
at com.google.gwt.user.client.ui.HTMLTable.setWidget(HTMLTable.java:1091)
at com.securify.webui.edwin.gwt.client.widgets.SystemDetailsWidget.serviceDetails(SystemDetailsWidget.java:384)
at com.securify.webui.edwin.gwt.client.widgets.SystemDetailsWidget.serviceList(SystemDetailsWidget.java:248)
at com.securify.webui.edwin.gwt.client.widgets.SystemDetailsWidget$1$1.execute(SystemDetailsWidget.java:107)
at com.google.gwt.user.client.CommandExecutor.doExecuteCommands(CommandExecutor.java:311)
at com.google.gwt.user.client.CommandExecutor$2.run(CommandExecutor.java:206)
at com.google.gwt.user.client.Timer.fireImpl(Timer.java:164)
at com.google.gwt.user.client.Timer.fireAndCatch(Timer.java:150)
at com.google.gwt.user.client.Timer.fire(Timer.java:142)
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:721)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:594)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:358)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)


I do the check to remove series of widgets before I redraw using the following code:

-------------------------------
public void removeAllSysDetailsWidgets() {

wc.removeAll();

if(sysDetails.getWidget(0,2) != null ) {
sysDetails.remove(sysDetails.getWidget(0,2));
}
if(sysDetails.getWidget(0,1) != null ) {
sysDetails.remove(sysDetails.getWidget(0,1));
}
if(sysDetails.getWidget(0,0) != null ) {
sysDetails.remove(sysDetails.getWidget(0,0));
}
}
-----------------------------------

Using setWidget() works the first time when I click. But when I try to re-draw the widgets, it gives the above exception. I have migrated our application from myGWT 0.5.2 to ExtGWT 1.0.2. This used to work before migration but is throwing exception now.

Thanks,
Padma