Class DynamicRoutesNavigationHandler


public class DynamicRoutesNavigationHandler extends ConfigurableNavigationHandler
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: