Any suggested workarounds?

I currently load a page layout in HTML (Header/Menu Bar/Footer) ...
then in each section I load different HTML layouts depending on the
user, and then I add the controls.


On Apr 27, 6:15 pm, Vitali Lovich <[email protected]> wrote:
> Yes this has already come up on the mailing list.  This was always illegal,
> just uncaught prior to 1.6.  You cannot wrap two elements in GWT if they
> already have a parent/child relationship in the DOM (causes a mismatch in
> the trees).
>
> Do a search & you'll find the response from the GWT developer regarding this
> issue.
>
>
>
> On Mon, Apr 27, 2009 at 11:12 AM, kohlyn <[email protected]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to