How to make sure that a new popup window always appears with empty fields?

Currently my window functions as intended, except that its forms are always filled with the information of the earlier popup window of the same type.

my window opener action in a buttonclicklistener is as follows:

UI.getCurrent().removeWindow(myWindow); UI.getCurrent().addWindow(myWindow); myWindow.setVisible(true); The save button in the said window does the following:

[saving actions]


As I open a new popup window when intending to save a new entry, the popup window has all the fields filled with the information of the earlier session. How can I make a window pop up with all its fields empty?

Thank you.

You are not opening a new popup: you are showing the old one. You can either create a new window to show (new Window, etc.) or you can create a method in your window class that clears the values: myWindow.clearValues(). That method could then go through each field and set the value to empty.

opte biz, please create a new thread for your question. In the thread you should also clarify what you mean with ‘print’; on paper? to a PDF? to a log message?