public class ExtendedPartialViewContextImpl extends ExtendedPartialViewContext
The RichFaces custom version of PartialViewContext
Unfortunately, it is not possible to get the parameters value from inside PartialViewContextFactory (due to encoding issues), so a RichFaces implementation wrapping the original context is created. It either delegates calls to the wrapped context (if the request does not include ‘org.richfaces.ajax.component’ parameter), or it executes the necessary logic (for RichFaces-initiated requests). The detectContextMode() method is responsible for this. Due to this issue we have to re-implement big portion of PartialViewContext functionality in our class.
Important differences of RichFaces implementation:
Constructor and Description |
---|
ExtendedPartialViewContextImpl(javax.faces.context.PartialViewContext wrappedViewContext,
javax.faces.context.FacesContext facesContext) |
Modifier and Type | Method and Description |
---|---|
protected void |
addImplicitExecuteIds(Collection<String> ids)
Adding implicitly executed areas to the list of component that should be executed
|
protected void |
addImplicitRenderIds(Collection<String> ids,
boolean limitRender)
Adding implicitly renderer areas to the list of component that should be rendered
|
protected void |
addJavaScriptServicePageScripts(javax.faces.context.FacesContext context)
Add scripts collected by
JavaScriptService as a partial response extension. |
protected org.richfaces.context.ExtendedPartialViewContextImpl.ContextMode |
detectContextMode() |
protected void |
executeComponents(javax.faces.event.PhaseId phaseId,
Collection<String> executeIds)
Executes tree visiting using callback
PartialViewExecuteVisitCallback with context ExecuteExtendedVisitContext |
Collection<String> |
getExecuteIds() |
javax.faces.context.PartialResponseWriter |
getPartialResponseWriter() |
Collection<String> |
getRenderIds() |
javax.faces.context.PartialViewContext |
getWrapped() |
boolean |
isExecuteAll() |
boolean |
isRenderAll() |
void |
processPartial(javax.faces.event.PhaseId phaseId) |
protected void |
processPartialExecutePhase(javax.faces.event.PhaseId phaseId)
Process partial phase method called by
#processPartial() for all phases except rendering. |
protected void |
processPartialRenderPhase()
Process partial phase method called by
#processPartial() for rendering phase |
void |
release() |
protected void |
renderExtensions(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Render RichFaces specific extensions for partial-update such as:
beforedumpdate
complete
render
data
componentData
|
void |
setRenderAll(boolean isRenderAll) |
appendOnbeforedomupdate, appendOncomplete, getFacesContext, getInstance, getOnbeforedomupdate, getOncomplete, getResponseComponentDataMap, getResponseData, isLimitRender, prependOnbeforedomupdate, prependOncomplete, setLimitRender, setResponseData
public ExtendedPartialViewContextImpl(javax.faces.context.PartialViewContext wrappedViewContext, javax.faces.context.FacesContext facesContext)
public javax.faces.context.PartialViewContext getWrapped()
getWrapped
in interface javax.faces.FacesWrapper<javax.faces.context.PartialViewContext>
getWrapped
in class javax.faces.context.PartialViewContextWrapper
public void processPartial(javax.faces.event.PhaseId phaseId)
processPartial
in class javax.faces.context.PartialViewContextWrapper
public Collection<String> getExecuteIds()
getExecuteIds
in class javax.faces.context.PartialViewContextWrapper
public Collection<String> getRenderIds()
getRenderIds
in class javax.faces.context.PartialViewContextWrapper
public boolean isExecuteAll()
isExecuteAll
in class javax.faces.context.PartialViewContextWrapper
public boolean isRenderAll()
isRenderAll
in class javax.faces.context.PartialViewContextWrapper
public void setRenderAll(boolean isRenderAll)
setRenderAll
in class javax.faces.context.PartialViewContextWrapper
public javax.faces.context.PartialResponseWriter getPartialResponseWriter()
getPartialResponseWriter
in class javax.faces.context.PartialViewContextWrapper
protected void processPartialExecutePhase(javax.faces.event.PhaseId phaseId)
#processPartial()
for all phases except rendering.protected void executeComponents(javax.faces.event.PhaseId phaseId, Collection<String> executeIds)
PartialViewExecuteVisitCallback
with context ExecuteExtendedVisitContext
protected void processPartialRenderPhase()
#processPartial()
for rendering phasepublic void release()
release
in class ExtendedPartialViewContext
protected void addImplicitExecuteIds(Collection<String> ids)
protected void addImplicitRenderIds(Collection<String> ids, boolean limitRender)
protected void addJavaScriptServicePageScripts(javax.faces.context.FacesContext context)
JavaScriptService
as a partial response extension.protected void renderExtensions(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws IOException
IOException
protected org.richfaces.context.ExtendedPartialViewContextImpl.ContextMode detectContextMode()
Copyright © 2014 JBoss by Red Hat. All rights reserved.