I'm getting the following errors with 1.6.4 on a Mac.
"A widget that has an existing parent widget may not be added to the
detach list"
The HTML is:
<body>
<!-- OPTIONAL: include this if you want history support -->
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
style="position:absolute;width:0;height:0;border:0"></iframe>
<h1>Web Application Starter Project</h1>
<div id="testdiv"></div>
</body>
Code:
public void onModuleLoad() {
HTMLPanel p = new HTMLPanel("<div id=\"testdiv2\">Test Div 2</
div>");
RootPanel.get("testdiv").add(p);
final TextBox txtUsername = new TextBox();
RootPanel.get("testdiv2").add(txtUsername);
}
}
This code worked in the 1.4 and 1.5 branches, but not 1.6.
The line:
"RootPanel.get("testdiv2").add(txtUsername);"
throws the exception.
"A widget that has an existing parent widget may not be added to
the detach list"
The problems appears to be with a new check in
RootPanel.detachOnWindowClose(Widget widget)
assert !isElementChildOfWidget(widget.getElement()) : "A widget
that has "
+ "an existing parent widget may not be added to the detach
list";
RootPanel.isElementChildOfWidget(Element element) appears to fail
because I'm adding a widget to an already attached element.
Any work arounds/ideas would be greatly appreciated ... I have a 1.4
application that is based on dynamically loading page layouts from a
database.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---