On 29 mai, 17:11, xfyre <[email protected]> wrote:
> I need to wrap an existing HTML instead of creating widgets
> dynamically, so that end user will have the entire form displayed
> before initialization of GWT components. But then there is a problem:
> if you attach RootPanel to an existing <div> element and then use
> Widget.wrap ( element ) for the FormPanel and its input controls, you
> get the exception:
>
> java.lang.AssertionError: A widget that has an existing parent widget
> may not be added to the detach list
>
> I've googled about the problem and found out that this exception
> prevents code from messing up widgets hierarchy; this is totally
> understandable point, but is there any way to get the job done? For a
> number of reasons I really need those widgets to initialize from HTML
> instead of being created dynamically.
>
> Any ideas?

Either:
 1. do not use a RootPanel on an ancestor div of your form (obviously)
 2. Reverse the order of the calls: FormPanel::wrap() first, then
RootPanel.get(); see issue 3528
http://code.google.com/p/google-web-toolkit/issues/detail?id=3528

-- 
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