Re: wrapping existing HTML form

2010-05-31 Thread xfyre
  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)

Even if I initialize the form before RootPanel, I get the same error,
but for the form controls.
For example TextBox.wrap ( element ) produces the same error when
called after FormPanel.wrap ( element )

  2. Reverse the order of the calls: FormPanel::wrap() first, then
 RootPanel.get(); see issue 
 3528http://code.google.com/p/google-web-toolkit/issues/detail?id=3528

I saw this one. Completely reversing call order doesn't look good.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



wrapping existing HTML form

2010-05-29 Thread xfyre
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?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: wrapping existing HTML form

2010-05-29 Thread Thomas Broyer


On 29 mai, 17:11, xfyre ilya.obsha...@gmail.com 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 google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.