GWT 中的这段代码(侧边栏是构建侧边栏的自定义):
HTML html = new HTML("
<div id=\"container\">some stuff</div>"
);
RootPanel.get("container").add(new Sidebar());
...给出那个错误:
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)
你能帮忙吗?我看过很多解释,但没有任何帮助。
谢谢 +