Important Notice - Forums is archived
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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
How listen event
I have to create one shop,
So I have one view that will be my MainView, with one cart summary, and I have 5 buttons, each one open a window with a diff crud, so when I close this window I need to add one item to my cart, So it`s possible to create one listener in my MainUI, and in every window fire one event that my MainView will listen??
something like this:
public class MainView implements View{
listenAddEvent(MyAddEvent myAddEvent){
// here I have my code
}
}
and in my windows I have something like this:
myButton.addClickLIstener( event -> {something.fireEvent(MyAddEvent.});
tks
I would suggest looking at the dashboard-demo as it uses EventBus for what you are describing.
More specifically check the files under the event package.