I’m trying to capture the button click event on a button within a subwindow, to be handled by the parent. The parent component (this) implements ClickListenerWindow
newWindow = new Window("test");
MyComponent myComponent = new MyComponent();
newWindow.setContent(myComponent);
newWindow.setModal(true);
myComponent.saveBtn.addClickListener(this);
UI.getCurrent().addWindow(newWindow);
I get the following error:
The method addClickListener(ClickListener) in the type FocusWidget is not applicable for the arguments (this)
Is there some other method for capturing events in sub windows that I’m missing?