Today I use this code to open a window:
public static void abrirJanela(String titulo, Integer altura, Integer largura, Component screen, CloseListener closeListener) {
Window window = new Window(titulo);
window.setWidth(largura, Unit.PERCENTAGE);
window.setHeight(altura, Unit.PERCENTAGE);
window.setModal(true);
window.setContent(tela);
UI.getCurrent().addWindow(window);
}
But now I need to pass one list to my window, and after close this window receive the same list (with changes), to pass a list It`s ok, I pass in constructor but how can I receive that list when window close ?? And how can I close my windows when I click one button inside this window?? looking for samples I only find a way to close when my class extends windows, but in this case my “screen” extends VerticalLayout
tks