I have a browse-edit combined screen that extends AbstractLookup class.
At some point I modify an item so my entitysDs datasource becomes modified. I don’t do any commits and later on I refresh that datasource and it becomes unmodified and with the same initial entities. I have to mention that entityDs is also unmodified with item=null.
When pressing on the x button of the window or when pressing ESC key the window shows me a notification that I have some unsaved data.
Why does the window thinks that I have unsaved data while the two datasources are unmodified? Is there a property that belongs to the window that needs to be refreshed as well?
Which window methods are called when pressing ESC key and x button? I may need to override them at some point.
Let’s say I managed to force the closing operation for x button like this:
this.addBeforeCloseWithCloseButtonListener(l-> close(CLOSE_ACTION_ID, true));
When trying to do the same for ESC key it generates NULL pointer exception so it’s not a good solution.
this.addBeforeCloseWithShortcutListener(l-> close(CLOSE_ACTION_ID, true));