To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.
Hello Team, I am referring https://vaadin.com/web/magi/home/-/blogs/model-view-presenter-pattern-with-vaadin
I have just started with vaadin MVP example. Thank you for above example I created it and it's working fine.
in above you passed the ClickListemer as argument in a new Button(caption, this) hence the listener is listening on every buttons. I appreciate the way it is working But how to do it for checkBox, textarea etc ? Because it does not have any constructor which takes *Listener(ValueChangeListener, ShortcutListener, ShortcutFocusListener) as a argument.
Please let me know if you need any other information from my side? Any pointers are highly appreciated.
Use add*Listener(*Listener). That is also the standard way to do it for a button, but the Button component has a "shortcut" version with a constructor parameter because for buttons you practically always want to use a listener.