com.sun.faces.application
public class NavigationHandlerImpl extends javax.faces.application.ConfigurableNavigationHandler
NavigationHandlerImpl is the class that implements default navigation handling. Refer to section 7.4.2 of the specification for more details. PENDING: Make independent of ApplicationAssociate.
Modifier and Type | Class and Description |
---|---|
private static class |
NavigationHandlerImpl.CaseStruct |
private static class |
NavigationHandlerImpl.NavigationMap |
Modifier and Type | Field and Description |
---|---|
private boolean |
development
Flag indicated the current mode.
|
private static java.util.regex.Pattern |
INCLUDE_VIEW_PARAMS_EQUALS_TRUE |
private static java.util.logging.Logger |
logger |
private NavigationHandlerImpl.NavigationMap |
navigationMap
Map containing configured navigation cases. |
private static java.util.regex.Pattern |
REDIRECT_EQUALS_TRUE |
Constructor and Description |
---|
NavigationHandlerImpl()
This constructor uses the current
ApplicationAssociate
instance to obtain the navigation mappings used to make
navigational decisions. |
Modifier and Type | Method and Description |
---|---|
private void |
clearViewMapIfNecessary(javax.faces.context.FacesContext facesContext,
java.lang.String newId)
Calls
clear() on the ViewMap (if available) if the view
ID of the UIViewRoot differs from newId |
private NavigationHandlerImpl.CaseStruct |
determineViewFromActionOutcome(javax.faces.context.FacesContext ctx,
java.util.Set<javax.faces.application.NavigationCase> caseSet,
java.lang.String fromAction,
java.lang.String outcome)
This method will attempt to find the
view identifier based on action reference
and outcome. |
private NavigationHandlerImpl.CaseStruct |
findDefaultMatch(javax.faces.context.FacesContext ctx,
java.lang.String fromAction,
java.lang.String outcome)
This method will extract the cases for which a
from-view-id is
an asterisk "*". |
private NavigationHandlerImpl.CaseStruct |
findExactMatch(javax.faces.context.FacesContext ctx,
java.lang.String viewId,
java.lang.String fromAction,
java.lang.String outcome)
This method finds the List of cases for the current
view identifier. |
private NavigationHandlerImpl.CaseStruct |
findImplicitMatch(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String fromAction,
java.lang.String outcome)
Create a navigation case based on content within the outcome.
|
private NavigationHandlerImpl.CaseStruct |
findWildCardMatch(javax.faces.context.FacesContext ctx,
java.lang.String viewId,
java.lang.String fromAction,
java.lang.String outcome)
This method traverses the wild card match List (containing
from-view-id
strings and finds the List of cases for each from-view-id string. |
javax.faces.application.NavigationCase |
getNavigationCase(javax.faces.context.FacesContext context,
java.lang.String fromAction,
java.lang.String outcome) |
java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> |
getNavigationCases() |
private NavigationHandlerImpl.CaseStruct |
getViewId(javax.faces.context.FacesContext ctx,
java.lang.String fromAction,
java.lang.String outcome)
This method uses helper methods to determine the new
view identifier. |
void |
handleNavigation(javax.faces.context.FacesContext context,
java.lang.String fromAction,
java.lang.String outcome) |
private void |
initializeNavigationFromAssociate() |
private void |
updateRenderTargets(javax.faces.context.FacesContext ctx,
java.lang.String newId) |
private static final java.util.logging.Logger logger
private volatile NavigationHandlerImpl.NavigationMap navigationMap
Map
containing configured navigation cases.private boolean development
private static final java.util.regex.Pattern REDIRECT_EQUALS_TRUE
private static final java.util.regex.Pattern INCLUDE_VIEW_PARAMS_EQUALS_TRUE
public NavigationHandlerImpl()
ApplicationAssociate
instance to obtain the navigation mappings used to make
navigational decisions.public javax.faces.application.NavigationCase getNavigationCase(javax.faces.context.FacesContext context, java.lang.String fromAction, java.lang.String outcome)
getNavigationCase
in class javax.faces.application.ConfigurableNavigationHandler
ConfigurableNavigationHandler.getNavigationCase(javax.faces.context.FacesContext, String, String)
public java.util.Map<java.lang.String,java.util.Set<javax.faces.application.NavigationCase>> getNavigationCases()
getNavigationCases
in class javax.faces.application.ConfigurableNavigationHandler
ConfigurableNavigationHandler.getNavigationCases()
public void handleNavigation(javax.faces.context.FacesContext context, java.lang.String fromAction, java.lang.String outcome)
handleNavigation
in class javax.faces.application.NavigationHandler
NavigationHandler.handleNavigation(javax.faces.context.FacesContext, String, String)
private void initializeNavigationFromAssociate()
private void clearViewMapIfNecessary(javax.faces.context.FacesContext facesContext, java.lang.String newId)
clear()
on the ViewMap (if available) if the view
ID of the UIViewRoot differs from newId
private void updateRenderTargets(javax.faces.context.FacesContext ctx, java.lang.String newId)
private NavigationHandlerImpl.CaseStruct getViewId(javax.faces.context.FacesContext ctx, java.lang.String fromAction, java.lang.String outcome)
view
identifier.
Refer to section 7.4.2 of the specification for more details.ctx
- the @{link FacesContext} for the current requestfromAction
- The action reference stringoutcome
- The outcome stringview
identifier.private NavigationHandlerImpl.CaseStruct findExactMatch(javax.faces.context.FacesContext ctx, java.lang.String viewId, java.lang.String fromAction, java.lang.String outcome)
view
identifier.
After the cases are found, the from-action
and from-outcome
values are evaluated to determine the new view
identifier.
Refer to section 7.4.2 of the specification for more details.ctx
- the FacesContext
for the current requestviewId
- The current view
identifier.fromAction
- The action reference string.outcome
- The outcome string.view
identifier.private NavigationHandlerImpl.CaseStruct findWildCardMatch(javax.faces.context.FacesContext ctx, java.lang.String viewId, java.lang.String fromAction, java.lang.String outcome)
from-view-id
strings and finds the List of cases for each from-view-id
string.
Refer to section 7.4.2 of the specification for more details.ctx
- the FacesContext
for the current requestviewId
- The current view
identifier.fromAction
- The action reference string.outcome
- The outcome string.view
identifier.private NavigationHandlerImpl.CaseStruct findDefaultMatch(javax.faces.context.FacesContext ctx, java.lang.String fromAction, java.lang.String outcome)
from-view-id
is
an asterisk "*".
Refer to section 7.4.2 of the specification for more details.ctx
- the FacesContext
for the current requestfromAction
- The action reference string.outcome
- The outcome string.view
identifier.private NavigationHandlerImpl.CaseStruct findImplicitMatch(javax.faces.context.FacesContext context, java.lang.String viewId, java.lang.String fromAction, java.lang.String outcome)
Create a navigation case based on content within the outcome.
context
- the FacesContext
for the current requestviewId
- of the UIViewRoot
for the current requestfromAction
- the navigation actionoutcome
- the navigation outcomeprivate NavigationHandlerImpl.CaseStruct determineViewFromActionOutcome(javax.faces.context.FacesContext ctx, java.util.Set<javax.faces.application.NavigationCase> caseSet, java.lang.String fromAction, java.lang.String outcome)
view
identifier based on action reference
and outcome. Refer to section 7.4.2 of the specification for more details.ctx
- the FacesContext
for the current requestcaseSet
- The list of navigation cases.fromAction
- The action reference string.outcome
- The outcome string.view
identifier.Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.