Listener when adding a Component to HTML

Hi!

Is there a way to know when a Component is added/merged to HTML in Vaadin ?

Let me explain in details:

When i´m adding a CustomLayout to a Container, i need to handle the CustomLayout component with JQuery.

I’ve tried with
@Override attach
, but this method is executed only when the Application knows that the CustomLayout is added.

After some debugging, in some part of internal sources, the PrintOutwriter closes the stream, and generates the HTML with the CustomLayout component. (Now i can use my JQuery functions).

How Vaadin knows when the CustomLayout ( or other UI component ) is added to HTML? (The div component and the childs…)

Thank you.

Manfred