I am having an issue when I try to "remove" and "add" a widget/canvas to the parent.
I have seen the response for this issue earlier in the existing thread but not able to get the response properly
Eg:
Not sure I am following the sequence of steps correctly or something I am missing. I would appreciate if you could help me with the sample to fix the issue.
Below is the error Trace:
Thanks
Kumar.
I have seen the response for this issue earlier in the existing thread but not able to get the response properly
Eg:
Code:
parent1.add(widget1); parent1.add(widget2); parent1.add(widget3); ... ... ... UpdateChart(){ widget1.removeFromParent(); widget1 = getNewChart(); parent1.addChild(widget1); // This is the place I am getting the error }
Below is the error Trace:
Code:
java.lang.AssertionError: A widget that has an existing parent widget may not be added to the detach list at com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose(RootPanel.java:136) at com.google.gwt.user.client.ui.RootPanel.get(RootPanel.java:211) at com.smartgwt.client.widgets.WidgetCanvas.onDraw(WidgetCanvas.java:39) at com.smartgwt.client.widgets.BaseWidget.rendered(BaseWidget.java:285) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.smartgwt.client.widgets.BaseWidget.draw(BaseWidget.java)
Kumar.
Comment