Add Listeners
Add a click, focus, or other listener to a component, and write its code in your IDE.
To make a component do something, add a listener to it. Copilot writes the stub, and your IDE opens at it, ready for the code.
Add a click listener to a button
-
Right-click a component, point at Add Listener, and choose one, here Add Click Listener.
-
Copilot adds the listener to ContactView.java, and your IDE opens at it.
Your IDE opens at the listener when you have the Vaadin plugin for your IDE. See IDE Integration.