-
Field Summary
Fields inherited from class jakarta.faces.context.PartialViewContext
ALL_PARTIAL_PHASE_CLIENT_IDS, PARTIAL_EVENT_PARAM_NAME, PARTIAL_EXECUTE_PARAM_NAME, PARTIAL_RENDER_PARAM_NAME, RESET_VALUES_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a mutableListof scripts to be evaluated in client side on complete of ajax request.Return aCollectionof client identifiers from the current request with the request parameter namePartialViewContext.PARTIAL_EXECUTE_PARAM_NAME.Return theResponseWriterto which components should direct their output for partial view rendering.Return aCollectionof client identifiers from the current request with the request parameter namePartialViewContext.PARTIAL_RENDER_PARAM_NAME.booleanReturntrueif the request headerFaces-Requestis present with the valuepartial/ajax.booleanReturntrueifPartialViewContext.isAjaxRequest()returnstrueandPartialViewContext.PARTIAL_EXECUTE_PARAM_NAMEis present in the current request with the valuePartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS.booleanReturntruePartialViewContext.isAjaxRequest()returnstrueor if the request headerFaces-Requestis present with the valuepartial/process.booleanReturntrueifPartialViewContext.isAjaxRequest()returnstrueandPartialViewContext.PARTIAL_RENDER_PARAM_NAMEis present in the current request with the valuePartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS.booleanReturntrueif the incoming request has a parameter named by the value ofPartialViewContext.RESET_VALUES_PARAM_NAMEand that value istrue.voidprocessPartial(PhaseId phaseId) Perform lifecycle processing on components during the indicatedphaseId.voidrelease()Release any resources associated with thisPartialViewContextinstance.voidsetPartialRequest(boolean isPartialRequest) Dynamically indicate that this is a partial request.voidsetRenderAll(boolean renderAll) Indicate the entire view must be rendered ifrenderAllistrue.
-
Constructor Details
-
PartialViewContextImpl
-
-
Method Details
-
isAjaxRequest
public boolean isAjaxRequest()Description copied from class:PartialViewContextReturn
trueif the request headerFaces-Requestis present with the valuepartial/ajax. Otherwise, returnfalse.- Specified by:
isAjaxRequestin classPartialViewContext- Returns:
- whether or not this is an ajax request
- See Also:
-
isPartialRequest
public boolean isPartialRequest()Description copied from class:PartialViewContextReturn
truePartialViewContext.isAjaxRequest()returnstrueor if the request headerFaces-Requestis present with the valuepartial/process. Otherwise, returnfalse.- Specified by:
isPartialRequestin classPartialViewContext- Returns:
- whether or not this request is partial
- See Also:
-
isExecuteAll
public boolean isExecuteAll()Description copied from class:PartialViewContextReturn
trueifPartialViewContext.isAjaxRequest()returnstrueandPartialViewContext.PARTIAL_EXECUTE_PARAM_NAMEis present in the current request with the valuePartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS. Otherwise, returnfalse.- Specified by:
isExecuteAllin classPartialViewContext- Returns:
- whether or not this is an execute all request
- See Also:
-
isRenderAll
public boolean isRenderAll()Description copied from class:PartialViewContextReturn
trueifPartialViewContext.isAjaxRequest()returnstrueandPartialViewContext.PARTIAL_RENDER_PARAM_NAMEis present in the current request with the valuePartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS. Otherwise, returnfalse.- Specified by:
isRenderAllin classPartialViewContext- Returns:
- whether or not this is a render all request
- See Also:
-
setRenderAll
public void setRenderAll(boolean renderAll) Description copied from class:PartialViewContextIndicate the entire view must be rendered if
renderAllistrue.- Specified by:
setRenderAllin classPartialViewContext- Parameters:
renderAll- the valuetrueindicates the entire view must be rendered.- See Also:
-
isResetValues
public boolean isResetValues()Description copied from class:PartialViewContextReturn
trueif the incoming request has a parameter named by the value ofPartialViewContext.RESET_VALUES_PARAM_NAMEand that value istrue. To preserve backward compatibility with custom implementations that may have extended from an earlier version of this class, an implementation is provided that returnsfalse. A compliant implementation must override this method to take the specified action.- Overrides:
isResetValuesin classPartialViewContext- Returns:
- whether or not this is a reset values request
-
setPartialRequest
public void setPartialRequest(boolean isPartialRequest) Description copied from class:PartialViewContextDynamically indicate that this is a partial request.
- Specified by:
setPartialRequestin classPartialViewContext- Parameters:
isPartialRequest- the valuetrueindicates this is a partial request.
-
getExecuteIds
Description copied from class:PartialViewContextReturn a
Collectionof client identifiers from the current request with the request parameter namePartialViewContext.PARTIAL_EXECUTE_PARAM_NAME. If there is no such request parameter, return an emptyCollection. These client identifiers are used to identify components that will be processed during theexecutephase of the request processing lifecycle. The returnedCollectionis mutable.- Specified by:
getExecuteIdsin classPartialViewContext- Returns:
- the ids for the execute portion of the lifecycle
- See Also:
-
getRenderIds
Description copied from class:PartialViewContextReturn a
Collectionof client identifiers from the current request with the request parameter namePartialViewContext.PARTIAL_RENDER_PARAM_NAME. If there is no such request parameter, return an emptyCollection. These client identifiers are used to identify components that will be processed during therenderphase of the request processing lifecycle. The returnedCollectionis mutable.- Specified by:
getRenderIdsin classPartialViewContext- Returns:
- the ids for the render portion of the lifecycle
- See Also:
-
getEvalScripts
Description copied from class:PartialViewContextReturns a mutable
Listof scripts to be evaluated in client side on complete of ajax request.- Specified by:
getEvalScriptsin classPartialViewContext- Returns:
- A mutable
Listof scripts to be evaluated in client side on complete of ajax request. - See Also:
-
processPartial
Description copied from class:PartialViewContextPerform lifecycle processing on components during the indicated
phaseId. Only those components with identifiers existing in theCollectionreturned fromPartialViewContext.getExecuteIds()andPartialViewContext.getRenderIds()will be processed.When the indicated
phaseIdequalsPhaseId.RENDER_RESPONSE, then perform the following tasks in sequence:- If
PartialViewContext.isResetValues()returnstrue, then callUIViewRoot.resetValues(FacesContext, Collection), passingPartialViewContext.getRenderIds(). - If
PartialViewContext.isRenderAll()returnsfalse, then render any component resource ofUIViewRootwhoseResourceHandler.getRendererTypeForResourceName(String)does not returnnull, and whoseUIComponent.getChildCount()is zero, and whoseResourceHandler.isResourceRendered(FacesContext, String, String)returnsfalse, in anupdateelement with an identifier ofjakarta.faces.Resource. - Process the components.
- Obtain the state by calling
StateManager.getViewState(jakarta.faces.context.FacesContext)and write it out as anupdateelement with an identifier of<VIEW_ROOT_CONTAINER_CLIENT_ID><SEP>jakarta.faces.ViewStatewhere<VIEW_ROOT_CONTAINER_CLIENT_ID>is the return fromUIComponent.getContainerClientId(FacesContext)on the view from whence this state originated, and<SEP>is the currently configuredUINamingContainer.getSeparatorChar(FacesContext). - If
PartialViewContext.isRenderAll()returnsfalse, then write out each script ofPartialViewContext.getEvalScripts()as anevalelement.
- Specified by:
processPartialin classPartialViewContext- Parameters:
phaseId- thePhaseIdthat indicates the lifecycle phase the components will be processed in.- See Also:
- If
-
getPartialResponseWriter
Description copied from class:PartialViewContextReturn the
ResponseWriterto which components should direct their output for partial view rendering. Within a given response, components can use either the ResponseStream or the ResponseWriter, but not both.- Specified by:
getPartialResponseWriterin classPartialViewContext- Returns:
- the
ResponseWriterfor output - See Also:
-
release
public void release()Description copied from class:PartialViewContextRelease any resources associated with this
PartialViewContextinstance.- Specified by:
releasein classPartialViewContext- See Also:
-