Class OutcomeTargetRenderer
- java.lang.Object
-
- jakarta.faces.render.Renderer
-
- com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
-
- com.sun.faces.renderkit.html_basic.OutcomeTargetRenderer
-
- Direct Known Subclasses:
OutcomeTargetButtonRenderer
,OutcomeTargetLinkRenderer
public abstract class OutcomeTargetRenderer extends HtmlBasicRenderer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
HtmlBasicRenderer.OptionComponentInfo, HtmlBasicRenderer.Param
-
-
Field Summary
-
Fields inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
EMPTY_PARAMS, logger
-
Fields inherited from class jakarta.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
-
-
Constructor Summary
Constructors Constructor Description OutcomeTargetRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addNavigationParams(NavigationCase navCase, Map<String,List<String>> existingParams)
void
decode(FacesContext context, UIComponent component)
Decode any new state of the specifiedUIComponent
from the request contained in the specifiedFacesContext
, and store that state on theUIComponent
.protected String
getEncodedTargetURL(FacesContext context, UIComponent component, NavigationCase navCase)
Resolve the target view id and then delegate toViewHandler.getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)
to produce a redirect URL, which will add the page parameters if necessary and properly prioritizing the parameter overrides.protected String
getFragment(UIComponent component)
protected String
getLabel(UIComponent component)
protected NavigationCase
getNavigationCase(FacesContext context, UIComponent component)
Invoke theNavigationHandler
preemptively to resolve aNavigationCase
for the outcome declared on theUIOutcomeTarget
component.protected Map<String,List<String>>
getParamOverrides(UIComponent component)
protected Object
getValue(UIComponent component)
protected boolean
isIncludeViewParams(UIComponent component, NavigationCase navcase)
protected void
renderPassThruAttributes(FacesContext ctx, ResponseWriter writer, UIComponent component, Attribute[] attributes, List excludedAttributes)
-
Methods inherited from class com.sun.faces.renderkit.html_basic.HtmlBasicRenderer
augmentIdReference, convertClientId, decodeBehaviors, encodeEnd, encodeRecursive, getBehaviorParameters, getChildren, getCurrentValue, getEndTextToRender, getFacet, getForComponent, getFormattedValue, getFormattedValue, getMessageIter, getParamList, getPassThruBehaviors, getRendersChildren, isBehaviorSource, rendererParamsNotNull, setSubmittedValue, shouldDecode, shouldEncode, shouldEncodeChildren, shouldWriteIdAttribute, writeIdAttributeIfNecessary
-
Methods inherited from class jakarta.faces.render.Renderer
encodeBegin, encodeChildren, getConvertedValue
-
-
-
-
Method Detail
-
decode
public void decode(FacesContext context, UIComponent component)
Description copied from class:Renderer
Decode any new state of the specified
UIComponent
from the request contained in the specifiedFacesContext
, and store that state on theUIComponent
.During decoding, events may be enqueued for later processing (by event listeners that have registered an interest), by calling
queueEvent()
on the associatedUIComponent
.- Overrides:
decode
in classHtmlBasicRenderer
- Parameters:
context
-FacesContext
for the request we are processingcomponent
-UIComponent
to be decoded.
-
renderPassThruAttributes
protected void renderPassThruAttributes(FacesContext ctx, ResponseWriter writer, UIComponent component, Attribute[] attributes, List excludedAttributes) throws IOException
- Throws:
IOException
-
getLabel
protected String getLabel(UIComponent component)
-
getFragment
protected String getFragment(UIComponent component)
-
getValue
protected Object getValue(UIComponent component)
- Overrides:
getValue
in classHtmlBasicRenderer
-
isIncludeViewParams
protected boolean isIncludeViewParams(UIComponent component, NavigationCase navcase)
-
getNavigationCase
protected NavigationCase getNavigationCase(FacesContext context, UIComponent component)
Invoke theNavigationHandler
preemptively to resolve aNavigationCase
for the outcome declared on theUIOutcomeTarget
component. The current view id is used as the from-view-id when matching navigation cases and the from-action is assumed to be null.- Parameters:
context
- theFacesContext
for the current requestcomponent
- the targetUIComponent
- Returns:
- the NavigationCase represeting the outcome target
-
getEncodedTargetURL
protected String getEncodedTargetURL(FacesContext context, UIComponent component, NavigationCase navCase)
Resolve the target view id and then delegate to
ViewHandler.getBookmarkableURL(jakarta.faces.context.FacesContext, String, java.util.Map, boolean)
to produce a redirect URL, which will add the page parameters if necessary and properly prioritizing the parameter overrides.- Parameters:
context
- theFacesContext
for the current requestcomponent
- the targetUIComponent
navCase
- the target navigation case- Returns:
- an encoded URL for the provided navigation case
-
addNavigationParams
protected void addNavigationParams(NavigationCase navCase, Map<String,List<String>> existingParams)
-
getParamOverrides
protected Map<String,List<String>> getParamOverrides(UIComponent component)
-
-