When WicketExceptions occur
(WicketRuntimeException: Cannot replace a component,
InvalidBehaviorIdException: Cannot find behavior,
ComponentNotFoundException: Component 'X' has been removed from page)
these are handled by the NavApp's little "snackbar" dialog, showing some tech info and an OK button.
Not so useful for the end user, it's unknown what to do next. Let's improve here.
Typically it's recommended to reload the browser or even logout/login but user doesn't know that. We could add an instruction in the dialog, and/or an automatic reload.
On the other hand, if the errors are indeed 'lenient' (as seen in code base), so can't we just ignore them like before, i.e. remove that dialog?
One case can be reproduced fairly easy by going to the search perspective, depublishing a document, find it again and publish. Repeat until it happens. It could be related to the pinger coming along while the dialog is open.
if it is an error that the user can ignore, don't show the snackbar
if reloading or perhaps log out/login will probably fix it, then:
- change the text to: 'Something went wrong. <Wicket message> Reload the page or relogin and try again'
- instead of OK provide a RELOAD option in the snackbar