Package dyntabs
Class TabNavigationHandler
java.lang.Object
jakarta.faces.application.NavigationHandler
jakarta.faces.application.ConfigurableNavigationHandler
org.primefaces.application.DialogNavigationHandler
dyntabs.TabNavigationHandler
public class TabNavigationHandler
extends org.primefaces.application.DialogNavigationHandler
Custom JSF NavigationHandler that intercepts navigation outcomes containing a colon
(
":") to open dynamic tabs instead of performing standard page navigation.
When an action outcome contains a colon, the part before the colon is treated as
a standard navigation outcome (typically the shell page), and the part after the colon
is used as the tab name to open via DynTabManager.launchTab(String).
Example usage in XHTML:
<!-- Opens the "Users" dynamic tab -->
<p:menuitem value="Users" action="uishell:Users" />
<!-- Opens the "Products" dynamic tab -->
<p:menuitem value="Products" action="uishell:Products" />
This handler extends PrimeFaces DialogNavigationHandler, so standard
JSF navigation and PrimeFaces dialog navigation both continue to work normally
when the outcome does not contain a colon.
Registration: Configure in faces-config.xml:
<application>
<navigation-handler>dyntabs.TabNavigationHandler</navigation-handler>
</application>
- Author:
- DynTabs
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTabNavigationHandler(jakarta.faces.application.ConfigurableNavigationHandler base) -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleNavigation(jakarta.faces.context.FacesContext facesContext, String action, String outcome) Handles JSF navigation.Methods inherited from class org.primefaces.application.DialogNavigationHandler
getNavigationCase, getNavigationCasesMethods inherited from class jakarta.faces.application.ConfigurableNavigationHandler
getNavigationCase, inspectFlow, performNavigationMethods inherited from class jakarta.faces.application.NavigationHandler
handleNavigation
-
Constructor Details
-
Method Details