views:

52

answers:

1

...and what can I do with my RichTextArea after the onInitialize method has been called that I cannot do before?

N.B. This is a cross-post from the GWT Google group, which produced no response.

+2  A: 

An InitializeEvent is fired just after the widget is attached to it's parent. Code that depends on the widget being attached to it's parents and thus the DOM shouldn't be executed before that point. The RichTextArea widget uses an iframe and this seems to be the cause that some functionality is only available after creation, also depending on the specific browser. I have no full list of all specific cases where you need to initialize code after the widget is attached. But one example specific the RichTextArea widget is if you want to set the focus on the widget the widget must be attached.

You could get the same behavior by extending the RichTextArea widget and overriding the onLoad method, but that requires creating a new class.

Hilbrand