I'm building an application using EXT for GWT (i.e. GXT). In GXT, every component that can be added to a page has an associated Render event that can be captured and handled. Due to some limitations I need to step down to pure GWT for a small portion of my application. Specifically, I want to modify the RichTextArea widget by adding some custom styles. This can only be done after a RichTextArea component is rendered. What is GWT's equivalent of GXT's render event?
A:
Each GWT widget has a protected onLoad
method, which is called after the widget is attached to it's parent (and I guess it's also rendered at that point). My guess is you need to override and implement this method in the widget you create the RichTextArea widget in and set the custom styles in the onLoad
method of that widget, or you can extend the RichTextArea and implement the onLoad
in this extended RichTextArea widget.
Hilbrand
2010-02-18 08:22:46