Skip to content
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

the order in which BeforeEnterObservers, BeforeLeaveObservers are executed should be determinable #3958

Closed
berndhopp opened this issue Apr 20, 2018 · 2 comments

Comments

@berndhopp
Copy link
Contributor

right now, it is impossible to say in which order Observers are executed, which is a problem for authentication. An authentication-observer should be the first observer to be executed, because otherwise other observers should probably not be executed at all, when the authentication-observer did not pass.
So my suggestion is to always make sure that the manually added observers ( per UI#addBeforeEnterListener() ) are the first to be executed, and to add a new method 'UI#setBeforeEnterListenerComparator(Comparator)'. So when a comparator is provided, the order of execution of the observers is always determined by the comparator.

@pleku
Copy link
Contributor

pleku commented Apr 23, 2018

Any concerns for implementing this as proposed, @Legioth @caalador ?

@Legioth
Copy link
Member

Legioth commented Apr 24, 2018

@pleku There's already a PR with a more promising implementation approach.

@pleku pleku added this to the 1.0.0.beta9 milestone Apr 26, 2018
@pleku pleku closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants