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

Update javadoc of rerouteTo()/forwardTo() #9060

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions flow-server/src/main/java/com/vaadin/flow/router/BeforeEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ public NavigationHandler getRerouteTarget() {
/**
* Forward the navigation to use the provided navigation handler instead of
* the currently used handler.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param forwardTarget
* the navigation handler to use, or {@code null} to clear a
Expand All @@ -275,6 +277,8 @@ public void forwardTo(NavigationHandler forwardTarget,

/**
* Forward the navigation to the given navigation state.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param targetState
* the target navigation state, not {@code null}
Expand All @@ -287,6 +291,8 @@ public void forwardTo(NavigationState targetState) {
/**
* Forward the navigation to show the given component instead of the
* component that is currently about to be displayed.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param forwardTargetComponent
* the component type to display, not {@code null}
Expand All @@ -301,6 +307,8 @@ public void forwardTo(Class<? extends Component> forwardTargetComponent) {
/**
* Forward the navigation to show the given component instead of the
* component that is currently about to be displayed.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param forwardTargetComponent
* the component type to display, not {@code null}
Expand All @@ -317,6 +325,8 @@ public void forwardTo(Class<? extends Component> forwardTargetComponent,
/**
* Forward to navigation component registered for given location string
* instead of the component about to be displayed.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param location
* forward target location string
Expand All @@ -337,6 +347,8 @@ public void forwardTo(String location) {
/**
* Forward to navigation component registered for given location string with
* given location parameter instead of the component about to be displayed.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param location
* reroute target location string
mvysny marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -352,6 +364,8 @@ public <T> void forwardTo(String location, T locationParam) {
/**
* Forward to navigation component registered for given location string with
* given location parameters instead of the component about to be displayed.
* <p>
* This function changes the browser URL as opposed to <code>rerouteTo()</code>.
*
* @param location
* reroute target location string
mvysny marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -367,6 +381,8 @@ public <T> void forwardTo(String location, List<T> locationParams) {
/**
* Reroutes the navigation to use the provided navigation handler instead of
* the currently used handler.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param rerouteTarget
* the navigation handler to use, or {@code null} to clear a
Expand All @@ -382,6 +398,8 @@ public void rerouteTo(NavigationHandler rerouteTarget,

/**
* Reroutes the navigation to the given navigation state.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param targetState
* the target navigation state of the rerouting, not {@code null}
Expand All @@ -394,6 +412,8 @@ public void rerouteTo(NavigationState targetState) {
/**
* Reroutes the navigation to show the given component instead of the
* component that is currently about to be displayed.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param routeTargetType
* the component type to display, not {@code null}
Expand All @@ -408,6 +428,8 @@ public void rerouteTo(Class<? extends Component> routeTargetType) {
/**
* Reroutes the navigation to show the given component instead of the
* component that is currently about to be displayed.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param routeTargetType
* the component type to display, not {@code null}
Expand All @@ -424,6 +446,8 @@ public void rerouteTo(Class<? extends Component> routeTargetType,
/**
* Reroute to navigation component registered for given location string
* instead of the component about to be displayed.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param route
* reroute target location string
Expand All @@ -444,6 +468,8 @@ public void rerouteTo(String route) {
/**
* Reroute to navigation component registered for given location string with
* given route parameter instead of the component about to be displayed.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param route
* reroute target location string
Expand All @@ -459,6 +485,8 @@ public <T> void rerouteTo(String route, T routeParam) {
/**
* Reroute to navigation component registered for given location string with
* given route parameters instead of the component about to be displayed.
* <p>
* This function doesn't change the browser URL as opposed to <code>forwardTo()</code>.
*
* @param route
* reroute target location string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ public Optional<NavigationHandler> getRerouteTarget() {
/**
* Reroutes the navigation to use the provided navigation handler instead of
* the currently used handler.
* <p>
* This function doesn't change the browser URL.
*
* @param rerouteTarget
* the navigation handler to use, or {@code null} to clear a
Expand All @@ -191,6 +193,8 @@ public void rerouteTo(NavigationHandler rerouteTarget) {
/**
* Reroutes the navigation to show the given component instead of the
* component that is currently about to be displayed.
* <p>
* This function doesn't change the browser URL.
*
* @param rerouteTargetState
* the target navigation state of the rerouting, not {@code null}
Expand Down