…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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An
InitializeEventis 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
RichTextAreawidget uses aniframeand 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 theRichTextAreawidget 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
RichTextAreawidget and overriding theonLoadmethod, but that requires creating a new class.