jmix-projects / jmix-ui

DEPRECATED. Use https://github.com/jmix-framework/jmix
https://www.jmix.io
3 stars 7 forks source link

Exception at screen opening leads to inability to close the screen #786

Closed mariodavid closed 2 years ago

mariodavid commented 2 years ago

Scenario

Given the following screens:

Actual Behavior

After clicking away the exception that is displayed via the exception dialog and trying to close the screen via (x), another exception occurs stating: Illegal State exception: Screen is not opened rys_Product.browse

1-unfetched-execption-happens-during-screen-initialization

2-when-closing-screen-it-is-not-possible-anymore

It is only possible to get rid of the broken screen, by logging out and logging in again.

Expected behavior

There are two possible options, that would be acceptable.

  1. the ProductEdit screen is immediately closed and the ProductBrowse screen is displayed again
  2. the ProductEdit screen is still shown, but when hitting the close (x) button, the "broken" screen is closed and the ProductBrowse screen is shown again
glebfox commented 2 years ago

The reasons for the exception can vary, even making the entire screen layout unresponsive to user interactions. That is why the Unexpected error dialog contains the Logout button, which is the most reliable way to handle exceptions without reopening the app in a new browser tab.