-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error views for CDIViewProvider don't know why it was loaded #98
Comments
Originally by viljoenp I'll attach a small patch ( cdi-security.patch ) to show one way I think it can be handled without breaking backwards compatibility. Personally I think Navigator should become an Interface in the long run though, that way a developer can implements his/her own security (and other) needs. In addition to providing for custom needs , it can also provide a cleaner interface ( for example in the case of CDI you don't really want to add views to the navigator with addView(...) summary of patch :
to handle security with a simple Notification:
|
Originally by viljoenp Attachment added: |
Originally by viljoenp The more I think about it the more I feel that the Navigator should change the way it handles failures. Even unknown views should be handled with an event rather than an ErrorViewPRovider. A more generic NavigationFailure Listener where the event can have information about the failure , aka no view could be found, acccess denied to the view , or any unhandled exception during the navigation.. |
Originally by @mstahv Is something going to happen for this in any time soon? |
We are currently not planning to add such API to the 1.x and 2.x branches of the Vaadin CDI add-on, but will rather look into how to handle this in Vaadin CDI 3.x. What we can do for 1.x, though, is to open up the methods Here is a simplified PoC of how a
|
This allows applications to address #98.
Required APIs opened in 1.0.4, implementations for later versions in ticket #223 |
Originally by @mstahv
Error view in cdi view provider is loaded when the view is not available, either at all or to e.g. due to a @RolesAllowed rule. For app developer it would be nice to know why.
Imported from https://dev.vaadin.com/ issue #13566
The text was updated successfully, but these errors were encountered: