NavigationCase represents a <navigation-case>
in
the navigation rule base, as well as the <from-view-id>
with
which this <navigation-case>
is a sibling.
- Since:
- 2.0
-
Constructor Summary
ConstructorDescriptionMutableNavigationCase
(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, boolean redirect, boolean includeViewParams) MutableNavigationCase
(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String, List<String>> parameters, boolean redirect, boolean includeViewParams) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCondition
(FacesContext context) Evaluates the<if>
for this<navigation-case>
, if any.Return the<from-action>
for this<navigation-case>
Return the<from-outcome>
for this<navigation-case>
Return the<from-view-id>
of the<navigation-rule>
inside which this<navigation-case>
is nested.Return the parameters to be included for navigation cases requiring a redirect.If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is given by the return fromNavigationCase.getFromOutcome()
is defined.getToViewId
(FacesContext context) Evaluates the<to-view-id>
for this<navigation-case>
boolean
Test if this navigation case has an associated<if>
element.int
hashCode()
boolean
Return the<redirect>
value for this<navigation-case>
.boolean
Return the<redirect>
value for this<navigation-case>
.void
setCondition
(String condition) void
setConditionExpression
(ValueExpression conditionExpression) void
setFromAction
(String fromAction) void
setFromOutcome
(String fromOutcome) void
setFromViewId
(String fromViewId) void
setIncludeViewParams
(boolean includeViewParams) void
setRedirect
(boolean redirect) void
setToFlowDocumentId
(String toFlowDocumentId) void
setToViewId
(String toViewId) toString()
Methods inherited from class jakarta.faces.application.NavigationCase
getActionURL, getBookmarkableURL, getRedirectURL, getResourceURL
-
Constructor Details
-
MutableNavigationCase
public MutableNavigationCase() -
MutableNavigationCase
-
MutableNavigationCase
-
-
Method Details
-
getFromViewId
Description copied from class:NavigationCase
Return the
<from-view-id>
of the<navigation-rule>
inside which this<navigation-case>
is nested.- Overrides:
getFromViewId
in classNavigationCase
- Returns:
- the from viedId.
-
setFromViewId
-
getFromAction
Description copied from class:NavigationCase
Return the
<from-action>
for this<navigation-case>
- Overrides:
getFromAction
in classNavigationCase
- Returns:
- the from action.
-
setFromAction
-
getFromOutcome
Description copied from class:NavigationCase
Return the
<from-outcome>
for this<navigation-case>
- Overrides:
getFromOutcome
in classNavigationCase
- Returns:
- the from outcome.
-
setFromOutcome
-
getToViewId
Description copied from class:NavigationCase
Evaluates the
<to-view-id>
for this<navigation-case>
- Overrides:
getToViewId
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the view ID that should be navigated to
-
setToViewId
-
getToFlowDocumentId
Description copied from class:NavigationCase
If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is given by the return from
NavigationCase.getFromOutcome()
is defined. Implementations must override this method to return the value defined in the corresponding application configuration resources element. The base implementation returns the empty string.- Overrides:
getToFlowDocumentId
in classNavigationCase
- Returns:
- the toFlow documentId.
-
setToFlowDocumentId
-
hasCondition
public boolean hasCondition()Description copied from class:NavigationCase
Test if this navigation case has an associated
<if>
element.- Overrides:
hasCondition
in classNavigationCase
- Returns:
true
if there's an<if>
element associated with this<navigation-case>
, otherwisefalse
-
getCondition
Description copied from class:NavigationCase
Evaluates the
Note throws any exceptions encountered during the process of evaluating the expression or obtaining its value.<if>
for this<navigation-case>
, if any. The expression to be evaluated is passed into the constructor as a string. When the expression is evaluated, its value must be coerced into aboolean
per the normal Jakarta Expression Language coercion rules.- Overrides:
getCondition
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
null
if there is no<if>
element associated with this<navigation-case>
, otherwise return the evaluation result of the condition
-
setCondition
-
setConditionExpression
-
getParameters
Description copied from class:NavigationCase
Return the parameters to be included for navigation cases requiring a redirect. If no parameters are defined,
null
will be returned. The keys in theMap
are parameter names. For each key, the corresponding value is aList
of unconverted values.- Overrides:
getParameters
in classNavigationCase
- Returns:
- the list of parameters, or
null
-
isRedirect
public boolean isRedirect()Description copied from class:NavigationCase
Return the
<redirect>
value for this<navigation-case>
. This will betrue
if the new view should be navigated to via aExternalContext.redirect(String)
- Overrides:
isRedirect
in classNavigationCase
- Returns:
true
if this is a redirect,false
otherwise.
-
setRedirect
public void setRedirect(boolean redirect) -
isIncludeViewParams
public boolean isIncludeViewParams()Description copied from class:NavigationCase
Return the
<redirect>
value for this<navigation-case>
. This will betrue
if the view parametets should be encoded into the redirect URL (only applies to redirect case)- Overrides:
isIncludeViewParams
in classNavigationCase
- Returns:
true
if view parameters are to be included,false
otherwise.
-
setIncludeViewParams
public void setIncludeViewParams(boolean includeViewParams) -
equals
- Overrides:
equals
in classNavigationCase
-
hashCode
public int hashCode()- Overrides:
hashCode
in classNavigationCase
-
toString
- Overrides:
toString
in classNavigationCase
-