[RESOLVED] Doubt with visual editor and listener

How do I switch between screens developed with Vaadin Composite.
For example:
On the main screen I have a button that opens a screen that opened this screen has a button called closed when you click it closes this screen, returning to the main screen.
How to put the listener to close this screen, since it is the button on the screen of the composite and not on the main screen.