|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.trinidad.context.PartialPageContext
org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PartialPageContextImpl
public class PartialPageContextImpl
Context object which is used to track the targets of a partial page render during the partial page rendering pass. Clients never need to explicitly create PartialPageContext objects.
During the partial rendering pass, some Renderer implementations may modify the set of partial targets that are rendered. (For example, the FormRenderer adds a partial target for its shared hidden fields if any children of the form are rendered.) After the partial render pass, getPartialTargets() can be called to determine the actual set of partial targets that were rendered.
| Constructor Summary | |
|---|---|
PartialPageContextImpl(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RequestContext reqContext)
Creates a PartialPageContext to use to render the partial targets with the specified ids. |
|
| Method Summary | |
|---|---|
void |
addPartialTarget(java.lang.String clientId)
Adds a new partial target to render. |
void |
addRenderedPartialTarget(java.lang.String clientId)
Adds a partial target that has already been rendered; this is needed if the "clientId" of a component does not match up to the top element (or elements). |
boolean |
areAllTargetsProcessed()
Returns true if all of the partial targets have been rendered. |
java.util.Iterator<java.lang.String> |
getPartialTargets()
Returns the set of partial targets for this rendering pass. |
java.util.Iterator<java.lang.String> |
getRenderedPartialTargets()
|
javax.faces.component.visit.VisitContext |
getVisitContext()
Returns the VisitContext to use when partial rendering. |
boolean |
isInsidePartialTarget()
Returns true if we are inside of a partial target. |
boolean |
isPartialTarget(java.lang.String clientId)
Tests whether the specified id is the client id of a UIComponent that should be rendered as part of the partial rendering pass. |
boolean |
isPartialTargetRendered(java.lang.String id)
Tests whether the specified partial target has been rendered. |
boolean |
isPossiblePartialTarget(java.lang.String componentId)
Tests whether the specified component id is a component id of a UIComponent that might be rendered in this partial rendering pass. |
void |
popRenderedPartialTarget()
Notifies the PartialPageContext that the current partial target has finished rendering. |
void |
pushRenderedPartialTarget(java.lang.String clientId)
Notifies the PartialPageContext that the specified partial target is about to be rendered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PartialPageContextImpl(javax.faces.context.FacesContext context,
org.apache.myfaces.trinidad.context.RequestContext reqContext)
| Method Detail |
|---|
public java.util.Iterator<java.lang.String> getPartialTargets()
getPartialTargets in class org.apache.myfaces.trinidad.context.PartialPageContextpublic boolean isPartialTarget(java.lang.String clientId)
isPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContextpublic boolean isPossiblePartialTarget(java.lang.String componentId)
Tests whether the specified component id is a component id of a UIComponent that might be rendered in this partial rendering pass.
As calculating clientIds is expensive, this method allows a cheap test to reject components
that shouldn't be rendered. If this method returns true, a more
exact test using isPartialTarget with the desired clientId should be performed.
isPossiblePartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContexttrue if a component with this id should be rendered.isPartialTarget(java.lang.String)public boolean isPartialTargetRendered(java.lang.String id)
isPartialTargetRendered in class org.apache.myfaces.trinidad.context.PartialPageContextpublic boolean areAllTargetsProcessed()
true if all of the partial targets have been rendered.
areAllTargetsProcessed in class org.apache.myfaces.trinidad.context.PartialPageContexttrue if all of the partial targets have been rendered.public void addPartialTarget(java.lang.String clientId)
This method may be called during the partial rendering pass to add to the set of partial targets, but only if the pass has not yet been completed. Clients should first check to see whether the partial rendering pass has finished by calling isPartialPassComplete() before calling this method.
addPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContextclientId - The clientId of the partial target to renderpublic boolean isInsidePartialTarget()
isInsidePartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContextpublic void addRenderedPartialTarget(java.lang.String clientId)
addRenderedPartialTarget in class org.apache.myfaces.trinidad.context.PartialPageContextpublic java.util.Iterator<java.lang.String> getRenderedPartialTargets()
getRenderedPartialTargets in class org.apache.myfaces.trinidad.context.PartialPageContextpublic javax.faces.component.visit.VisitContext getVisitContext()
getVisitContext in class org.apache.myfaces.trinidad.context.PartialPageContextpublic void pushRenderedPartialTarget(java.lang.String clientId)
This method is called automatically by Trinidad during the partial rendering pass when a partial target is about to be rendered. Clients should never need to call this method.
clientId - The clientId of the partial target that is about to be renderedpopRenderedPartialTarget()public void popRenderedPartialTarget()
This method is called automatically by Trinidad during the partial rendering pass when a partial target has finished rendering. Clients should never need to call this method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||