public class PartialViewContextImpl
extends jakarta.faces.context.PartialViewContext
| Constructor and Description |
|---|
PartialViewContextImpl(jakarta.faces.context.FacesContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getEvalScripts()
Returns a mutable |
Collection<String> |
getExecuteIds()
Return a |
jakarta.faces.context.PartialResponseWriter |
getPartialResponseWriter()
Return the |
Collection<String> |
getRenderIds()
Return a |
boolean |
isAjaxRequest()
Return |
boolean |
isExecuteAll()
Return |
boolean |
isPartialRequest()
Return |
boolean |
isRenderAll()
Return |
boolean |
isResetValues()
Return |
void |
processPartial(jakarta.faces.event.PhaseId phaseId)
Perform lifecycle processing on components during the indicated |
void |
release()
Release any resources associated with this
PartialViewContext
instance. |
void |
setPartialRequest(boolean isPartialRequest)
Dynamically indicate that this is a partial request. |
void |
setRenderAll(boolean renderAll)
Indicate the entire view must be rendered if |
public PartialViewContextImpl(jakarta.faces.context.FacesContext ctx)
public boolean isAjaxRequest()
jakarta.faces.context.PartialViewContext
Return true if the request header Faces-Request is present with the value
partial/ajax. Otherwise, return false.
isAjaxRequest in class jakarta.faces.context.PartialViewContextPartialViewContext.isAjaxRequest()public boolean isPartialRequest()
jakarta.faces.context.PartialViewContext
Return true PartialViewContext.isAjaxRequest() returns true or if the request header
Faces-Request is present with the value partial/process. Otherwise, return
false.
isPartialRequest in class jakarta.faces.context.PartialViewContextPartialViewContext.isPartialRequest()public boolean isExecuteAll()
jakarta.faces.context.PartialViewContext
Return true if PartialViewContext.isAjaxRequest() returns true and PartialViewContext.PARTIAL_EXECUTE_PARAM_NAME
is present in the current request with the value PartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS. Otherwise, return
false.
isExecuteAll in class jakarta.faces.context.PartialViewContextPartialViewContext.isExecuteAll()public boolean isRenderAll()
jakarta.faces.context.PartialViewContext
Return true if PartialViewContext.isAjaxRequest() returns true and PartialViewContext.PARTIAL_RENDER_PARAM_NAME
is present in the current request with the value PartialViewContext.ALL_PARTIAL_PHASE_CLIENT_IDS. Otherwise, return
false.
isRenderAll in class jakarta.faces.context.PartialViewContextPartialViewContext.isRenderAll()public void setRenderAll(boolean renderAll)
jakarta.faces.context.PartialViewContext
Indicate the entire view must be rendered if renderAll is true.
setRenderAll in class jakarta.faces.context.PartialViewContextrenderAll - the value true indicates the entire view must be rendered.PartialViewContext.setRenderAll(boolean)public boolean isResetValues()
jakarta.faces.context.PartialViewContext
Return true if the incoming request has a parameter named by the value of
PartialViewContext.RESET_VALUES_PARAM_NAME and that value is true. To preserve backward compatibility with custom
implementations that may have extended from an earlier version of this class, an implementation is provided that
returns false. A compliant implementation must override this method to take the specified action.
isResetValues in class jakarta.faces.context.PartialViewContextpublic void setPartialRequest(boolean isPartialRequest)
jakarta.faces.context.PartialViewContextDynamically indicate that this is a partial request.
setPartialRequest in class jakarta.faces.context.PartialViewContextisPartialRequest - the value true indicates this is a partial request.public Collection<String> getExecuteIds()
jakarta.faces.context.PartialViewContext
Return a Collection of client identifiers from the current request with the request parameter name
PartialViewContext.PARTIAL_EXECUTE_PARAM_NAME. If there is no such request parameter, return an empty Collection.
These client identifiers are used to identify components that will be processed during the execute phase
of the request processing lifecycle. The returned Collection is mutable.
getExecuteIds in class jakarta.faces.context.PartialViewContextPartialViewContext.getExecuteIds()public Collection<String> getRenderIds()
jakarta.faces.context.PartialViewContext
Return a Collection of client identifiers from the current request with the request parameter name
PartialViewContext.PARTIAL_RENDER_PARAM_NAME. If there is no such request parameter, return an empty Collection.
These client identifiers are used to identify components that will be processed during the render phase
of the request processing lifecycle. The returned Collection is mutable.
getRenderIds in class jakarta.faces.context.PartialViewContextPartialViewContext.getRenderIds()public List<String> getEvalScripts()
jakarta.faces.context.PartialViewContext
Returns a mutable List of scripts to be evaluated in client side on complete of ajax request.
getEvalScripts in class jakarta.faces.context.PartialViewContextList of scripts to be evaluated in client side on complete of ajax request.PartialViewContext.getEvalScripts()public void processPartial(jakarta.faces.event.PhaseId phaseId)
jakarta.faces.context.PartialViewContext
Perform lifecycle processing on components during the indicated phaseId. Only those components with
identifiers existing in the Collection returned from PartialViewContext.getExecuteIds() and PartialViewContext.getRenderIds()
will be processed.
When the indicated phaseId equals PhaseId.RENDER_RESPONSE, then perform the following tasks in
sequence:
PartialViewContext.isResetValues() returns true, then call
UIViewRoot.resetValues(FacesContext, Collection), passing PartialViewContext.getRenderIds().PartialViewContext.isRenderAll() returns false, then render any component resource of UIViewRoot
whose ResourceHandler.getRendererTypeForResourceName(String) does not return null, and whose
UIComponent.getChildCount() is zero, and whose
ResourceHandler.isResourceRendered(FacesContext, String, String) returns false, in an
update element with an identifier of jakarta.faces.Resource.StateManager.getViewState(jakarta.faces.context.FacesContext) and write it out as an update element
with an identifier of <VIEW_ROOT_CONTAINER_CLIENT_ID><SEP>jakarta.faces.ViewState where
<VIEW_ROOT_CONTAINER_CLIENT_ID> is the return from
UIComponent.getContainerClientId(FacesContext) on the view from whence this state originated, and
<SEP> is the currently configured UINamingContainer.getSeparatorChar(FacesContext).PartialViewContext.isRenderAll() returns false, then write out each script of PartialViewContext.getEvalScripts() as
an eval element.processPartial in class jakarta.faces.context.PartialViewContextphaseId - the PhaseId that indicates the lifecycle phase the components will be
processed in.PartialViewContext.processPartial(jakarta.faces.event.PhaseId)public jakarta.faces.context.PartialResponseWriter getPartialResponseWriter()
jakarta.faces.context.PartialViewContext
Return the ResponseWriter to 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.
getPartialResponseWriter in class jakarta.faces.context.PartialViewContextResponseWriter for outputPartialViewContext.getPartialResponseWriter()public void release()
jakarta.faces.context.PartialViewContext
Release any resources associated with this PartialViewContext
instance.
release in class jakarta.faces.context.PartialViewContextPartialViewContext.release()Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.