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.
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 |
---|---|
javax.faces.application.NavigationCase |
getNavigationCase(javax.faces.context.FacesContext context,
String fromAction,
String outcome)
Return the |
javax.faces.application.NavigationCase |
getNavigationCase(javax.faces.context.FacesContext context,
String fromAction,
String outcome,
String toFlowDocumentId)
Return the |
Map<String,Set<javax.faces.application.NavigationCase>> |
getNavigationCases()
Return a |
void |
handleNavigation(javax.faces.context.FacesContext context,
String fromAction,
String outcome)
Perform navigation
processing based on the state information in the specified
FacesContext , plus the outcome string returned by an executed
application action. |
void |
handleNavigation(javax.faces.context.FacesContext context,
String fromAction,
String outcome,
String toFlowDocumentId)
Overloaded variant of |
void |
inspectFlow(javax.faces.context.FacesContext context,
javax.faces.flow.Flow flow)
Called by the flow system to cause the flow to be inspected for navigation rules. |
static boolean |
isResetFlowHandlerState(javax.faces.context.FacesContext facesContext) |
static void |
setResetFlowHandlerStateIfUnset(javax.faces.context.FacesContext facesContext,
boolean resetFlowHandlerState) |
static void |
unsetResetFlowHandlerState(javax.faces.context.FacesContext facesContext) |
public NavigationHandlerImpl()
ApplicationAssociate
instance to obtain the navigation mappings used to make
navigational decisions.public static boolean isResetFlowHandlerState(javax.faces.context.FacesContext facesContext)
public static void setResetFlowHandlerStateIfUnset(javax.faces.context.FacesContext facesContext, boolean resetFlowHandlerState)
public static void unsetResetFlowHandlerState(javax.faces.context.FacesContext facesContext)
public javax.faces.application.NavigationCase getNavigationCase(javax.faces.context.FacesContext context, String fromAction, String outcome)
javax.faces.application.ConfigurableNavigationHandler
Return the NavigationCase
representing the navigation that would be taken had NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
been called with the same
arguments or null
if there is no such case.
getNavigationCase
in class javax.faces.application.ConfigurableNavigationHandler
context
- The FacesContext
for the current requestfromAction
- The action binding expression that was evaluated
to retrieve the specified outcome, or null
if the
outcome was acquired by some other meansoutcome
- The logical outcome returned by a previous invoked
application action (which may be null
)null
.ConfigurableNavigationHandler.getNavigationCase(javax.faces.context.FacesContext, String, String)
public javax.faces.application.NavigationCase getNavigationCase(javax.faces.context.FacesContext context, String fromAction, String outcome, String toFlowDocumentId)
javax.faces.application.ConfigurableNavigationHandler
Return the NavigationCase
representing the navigation that would be taken had NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
been called with the same
arguments or null
if there is no such case. Implementations
that comply the version of the specification in which this method
was introduced must override this method. For compatibility with
decorated implementations that comply with an earlier version of the
specification, an implementation is provided that simply calls
through to ConfigurableNavigationHandler.getNavigationCase(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
,
ignoring the toFlowDocumentId
parameter.
getNavigationCase
in class javax.faces.application.ConfigurableNavigationHandler
context
- The FacesContext
for the current requestfromAction
- The action binding expression that was evaluated
to retrieve the specified outcome, or null
if the
outcome was acquired by some other meansoutcome
- The logical outcome returned by a previous invoked
application action (which may be null
)toFlowDocumentId
- The value of the toFlowDocumentId
property
for the navigation case (which may be null
)null
.public Map<String,Set<javax.faces.application.NavigationCase>> getNavigationCases()
javax.faces.application.ConfigurableNavigationHandler
Return a Map<String,
Set<NavigationCase>>
where the keys are
<from-view-id>
values and the values are
Set<NavigationCase>
where each element in the
Set is a NavigationCase
that applies to that
<from-view-id>
. The implementation must
support live modifications to this Map
.
getNavigationCases
in class javax.faces.application.ConfigurableNavigationHandler
ConfigurableNavigationHandler.getNavigationCases()
public void inspectFlow(javax.faces.context.FacesContext context, javax.faces.flow.Flow flow)
javax.faces.application.ConfigurableNavigationHandler
Called by the flow system to cause the flow to be inspected for navigation rules. For backward compatibility with earlier implementations, an empty method is provided.
inspectFlow
in class javax.faces.application.ConfigurableNavigationHandler
context
- the Faces context.flow
- the flow.public void handleNavigation(javax.faces.context.FacesContext context, String fromAction, String outcome)
javax.faces.application.NavigationHandler
Perform navigation
processing based on the state information in the specified FacesContext
, plus the outcome string returned by an executed
application action.
If the implementation class also
extends ConfigurableNavigationHandler
, the implementation
must guarantee that the logic used in a call to ConfigurableNavigationHandler.getNavigationCase(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
is used in this
method to determine the correct navigation.
This method must set the render targets
(used in partial rendering) to render all
invoking PartialViewContext.setRenderAll(boolean)
)
if the view identifier has changed as the result of an application
action (to take into account Ajax requests
).
handleNavigation
in class javax.faces.application.NavigationHandler
context
- The FacesContext
for the current requestfromAction
- The action binding expression that was evaluated
to retrieve the specified outcome, or null
if the
outcome was acquired by some other meansoutcome
- The logical outcome returned by a previous invoked
application action (which may be null
)public void handleNavigation(javax.faces.context.FacesContext context, String fromAction, String outcome, String toFlowDocumentId)
javax.faces.application.NavigationHandler
Overloaded variant of NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
that allows the caller to provide the defining document id for a flow
to be entered by this navigation. For backward compatibility with
decorated NavigationHandler
implementations that conform to an
earlier version of the specification, an implementation is provided that
calls through to NavigationHandler.handleNavigation(javax.faces.context.FacesContext, java.lang.String, java.lang.String)
,
ignoring the toFlowDocumentId
parameter.
handleNavigation
in class javax.faces.application.NavigationHandler
context
- The FacesContext
for the current requestfromAction
- The action binding expression that was evaluated
to retrieve the specified outcome, or null
if the
outcome was acquired by some other meansoutcome
- The logical outcome returned by a previous invoked
application action (which may be null
)toFlowDocumentId
- The defining document id of the flow into which
this navigation will cause entry.Copyright © 2010–2019 JBoss by Red Hat. All rights reserved.