How Events and Listeners work exactly ?


can someone explain precisely what happens when a user clicks on a Button ?


The client side engine of Vaadin detects the click, and calls the server rpc of the button class. If there are other changes on the client side, those changes are sent as well, in the order they happened (button rpc will be last). The server gets the message and parses out the individual changes. For each change, it calls the appropriate method for the component, triggering any listeners. The last component that changes is the Button, and it’s clicklisteners will be fired (if there are any). When all events have been fired, Vaadin checks the component hierarchy, and sends any changes (new states and client rpcs) back to the client.

Thanks for your answer. It’s clearer now.