spring-framework / org.springframework.web.jsf / DecoratingNavigationHandler

DecoratingNavigationHandler

abstract class DecoratingNavigationHandler : NavigationHandler

Base class for JSF NavigationHandler implementations that want to be capable of decorating an original NavigationHandler.

Supports the standard JSF style of decoration (through a constructor argument) as well as an overloaded handleNavigation method with explicit NavigationHandler argument (passing in the original NavigationHandler). Subclasses are forced to implement this overloaded handleNavigation method. Standard JSF invocations will automatically delegate to the overloaded method, with the constructor-injected NavigationHandler as argument.

Author
Juergen Hoeller

Since
1.2.7

See Also
#handleNavigation(javax.faces.context.FacesContext, String, String, NavigationHandler)DelegatingNavigationHandlerProxy

Functions

getDecoratedNavigationHandler

fun getDecoratedNavigationHandler(): NavigationHandler

Return the fixed original NavigationHandler decorated by this handler, if any (that is, if passed in through the constructor).

handleNavigation

fun handleNavigation(facesContext: FacesContext, fromAction: String, outcome: String): Unit

This implementation of the standard JSF handleNavigation method delegates to the overloaded variant, passing in constructor-injected NavigationHandler as argument.

abstract fun handleNavigation(facesContext: FacesContext, fromAction: String, outcome: String, originalNavigationHandler: NavigationHandler): Unit

Special handleNavigation variant with explicit NavigationHandler argument. Either called directly, by code with an explicit original handler, or called from the standard handleNavigation method, as plain JSF-defined NavigationHandler.

Implementations should invoke callNextHandlerInChain to delegate to the next handler in the chain. This will always call the most appropriate next handler (see callNextHandlerInChain javadoc). Alternatively, the decorated NavigationHandler or the passed-in original NavigationHandler can also be called directly; however, this is not as flexible in terms of reacting to potential positions in the chain.