java.lang.Object
jakarta.faces.application.NavigationHandler
jakarta.faces.application.ConfigurableNavigationHandler
org.omnifaces.facesviews.DynamicRoutesNavigationHandler
Resolves an outcome which spells out a dynamic route with its segment values already filled in, such as
<h:link outcome="/organizations/123/members" />, so that the concrete URL can be used as the outcome instead of the bracketed template
plus a <o:pathParam name> for every segment.
Such an outcome resolves to no view of its own, as the only view on disk is the bracketed one, so the standard navigation handler finds no navigation case
for it and the outcome target component renders without a target at all. This wrapper walks the scanned dynamic routes instead and, on a match, produces a
navigation case which points at the physical bracketed view and carries the resolved segment values as parameters named after
"org.omnifaces.pathparam.". Both implementations merge the parameters of a navigation case into the
ones handed to ViewHandler.getBookmarkableURL(FacesContext, String, Map, boolean), which is where
FacesViewsViewHandler substitutes them back into the URL.
- Since:
- 5.5
- Author:
- Bauke Scholtz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct the dynamic routes navigation handler. -
Method Summary
Modifier and TypeMethodDescriptiongetNavigationCase(FacesContext context, String fromAction, String outcome) getNavigationCase(FacesContext context, String fromAction, String outcome, String toFlowDocumentId) Returns the wrapped navigation handler.voidhandleNavigation(FacesContext context, String fromAction, String outcome) The wrapped navigation handler resolves an action outcome by consulting its own navigation cases rather than this wrapper's, so a dynamic route would otherwise be invisible to it and the navigation would silently not happen at all.Methods inherited from class jakarta.faces.application.ConfigurableNavigationHandler
inspectFlow, performNavigationMethods inherited from class jakarta.faces.application.NavigationHandler
handleNavigation
-
Constructor Details
-
Method Details
-
getWrapped
Returns the wrapped navigation handler.- Returns:
- The wrapped navigation handler.
-