Event that signals that UI component was rendered in browser?

Is there any event that is triggered when a UI component (e.g. VerticalLayout) was successfully rendered?

I’m using a custom JavaScript embedded in a component and want to call a function immediately after that component is opened (e.g. tab).

Attach() doesn’t do the job as it is called after addComponent() but before the UI component is shown in the browser.


Do you mean:

component.addAttachListener(new AttachListener()
	public void attach(AttachEvent event)


Hi - attach() doesn’t do the job as it is fired when the component gets attached to the parent. That doesn’t mean that the component is shown in the UI…

Old thread, but I need this as well.

I have an extension which applies syntax highlighting to text in a widget (by modifying the DOM in place).

It works great in simple cases.

But if (for example) the widget is contained within a TabSheet.Tab, then when you click away to another tab, and then return to the original tab, the syntax highlighting is lost because the HTML is re-rendered (apparently).

If I could get notified of this happening, then I could reapply the syntax highlighting after re-rendering.

Unfortunately, however, there doesn’t seem to be any way to get notified of a re-rendering.