Better explanations of the use cases for AfterNavigationListener and AfterNavigationObserver

Open Beginner friendly
#3,785 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
documentation

Research direction

Start with the AfterNavigationEvent documentation linked in the issue and locate the section explaining AfterNavigationObserver and AfterNavigationListener. Clarify at the beginning that observers are component-scoped while listeners are UI-scoped and run before observers; done means readers can choose the appropriate interface for a component or for navigation generally.

Written by the indexing model from the issue text.

Description

flow

Tell us about your request

AfterNavigationEvent documentation leaves a confusion for readers between AfterNavigationObserver and AfterNavigationListener.

Despite this article has a technically correct explanation for how to add them and what's their order, it should highlight the essential difference between them:

  • observers are implemented by component class and being active only when this component is attached to UI;
  • listeners are added to UI instance without a need to implement any interface or override a method.

Observers are "per component" and Listeners are "per UI", i.e. invoked before any found observer.

Hopefully these key point, if placed in the very beginning of this chapter, would help readers which interface to use for particular component Java class and which to use for any navigation.


If you think this issue is important, add a 👍 reaction to help the community and maintainers prioritize this issue.

Dominant language
AsciiDoc
Stars
38
Forks
225
Avg merge
1d 4h
Merged PRs (30d)
170

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vaadin/docs

All issues in vaadin/docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.