public class PartialViewContextImpl
extends javax.faces.context.PartialViewContext
| Constructor and Description |
|---|
PartialViewContextImpl(javax.faces.context.FacesContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getEvalScripts()
Returns a mutable |
Collection<String> |
getExecuteIds()
Return a
|
javax.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(javax.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(javax.faces.context.FacesContext ctx)
public boolean isAjaxRequest()
javax.faces.context.PartialViewContext
Return true if the request header
Faces-Request is present with the value
partial/ajax.
Otherwise, return false.
isAjaxRequest in class javax.faces.context.PartialViewContextPartialViewContext.isAjaxRequest()public boolean isPartialRequest()
javax.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 javax.faces.context.PartialViewContextPartialViewContext.isPartialRequest()public boolean isExecuteAll()
javax.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 javax.faces.context.PartialViewContextPartialViewContext.isExecuteAll()public boolean isRenderAll()
javax.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 javax.faces.context.PartialViewContextPartialViewContext.isRenderAll()public void setRenderAll(boolean renderAll)
javax.faces.context.PartialViewContext
Indicate the entire view must be rendered if
renderAll is true.
setRenderAll in class javax.faces.context.PartialViewContextrenderAll - the value true indicates
the entire view must be rendered.PartialViewContext.setRenderAll(boolean)public boolean isResetValues()
javax.faces.context.PartialViewContextReturn 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 javax.faces.context.PartialViewContextpublic void setPartialRequest(boolean isPartialRequest)
javax.faces.context.PartialViewContextDynamically indicate that this is a partial request.
setPartialRequest in class javax.faces.context.PartialViewContextisPartialRequest - the value true indicates
this is a partial request.public Collection<String> getExecuteIds()
javax.faces.context.PartialViewContextReturn 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 javax.faces.context.PartialViewContextPartialViewContext.getExecuteIds()public Collection<String> getRenderIds()
javax.faces.context.PartialViewContextReturn 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 javax.faces.context.PartialViewContextPartialViewContext.getRenderIds()public List<String> getEvalScripts()
javax.faces.context.PartialViewContext
Returns a mutable List of scripts to be evaluated in client side on complete of ajax request.
getEvalScripts in class javax.faces.context.PartialViewContextList of scripts to be evaluated in client side on complete of ajax request.PartialViewContext.getEvalScripts()public void processPartial(javax.faces.event.PhaseId phaseId)
javax.faces.context.PartialViewContextPerform 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 javax.faces.Resource.StateManager.getViewState(javax.faces.context.FacesContext) and write it out as an update
element with an identifier of <VIEW_ROOT_CONTAINER_CLIENT_ID><SEP>javax.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 javax.faces.context.PartialViewContextphaseId - the PhaseId that indicates
the lifecycle phase the components will be processed in.PartialViewContext.processPartial(javax.faces.event.PhaseId)public javax.faces.context.PartialResponseWriter getPartialResponseWriter()
javax.faces.context.PartialViewContextReturn 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 javax.faces.context.PartialViewContextResponseWriter for outputPartialViewContext.getPartialResponseWriter()public void release()
javax.faces.context.PartialViewContextRelease any
resources associated with this PartialViewContext
instance.
release in class javax.faces.context.PartialViewContextPartialViewContext.release()Copyright © 2010–2024 JBoss by Red Hat. All rights reserved.