|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIViewRoot
com.liferay.faces.bridge.renderkit.primefaces.internal.ResourceCapturingUIViewRoot
public class ResourceCapturingUIViewRoot
This class is used by HeadRendererPrimeFacesImpl in order to workaround FACES-2061. It does this by
tricking the org.primefaces.renderkit.HeadRenderer class into thinking that there are no component resources
in the ViewRoot. This is necessary because the com.sun.faces.renderkit.html_basic.ScriptRenderer#encodeEnd(FacesContext,UIComponent) and com.sun.faces.renderkit.html_basic.StylesheetRenderer#encodeEnd(FacesContext,UIComponent) methods keep track of
resources that have been rendered in a FacesContext attribute, which prevents the bridge's head renderer from
subsequently being able to render the component resources.
In addition, this class captures (remembers) the component resources that were added by the PrimeFaces HeadRenderer.
| Field Summary |
|---|
| Fields inherited from class javax.faces.component.UIViewRoot |
|---|
COMPONENT_FAMILY, COMPONENT_TYPE, METADATA_FACET_NAME, UNIQUE_ID_PREFIX, VIEW_PARAMETERS_KEY |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY |
| Constructor Summary | |
|---|---|
ResourceCapturingUIViewRoot()
|
|
| Method Summary | |
|---|---|
void |
addComponentResource(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent componentResource,
String target)
|
List<javax.faces.component.UIComponent> |
getCapturedComponentResources(String target)
|
List<javax.faces.component.UIComponent> |
getComponentResources(javax.faces.context.FacesContext context,
String target)
|
| Methods inherited from class javax.faces.component.UIViewRoot |
|---|
addComponentResource, addPhaseListener, broadcastEvents, createUniqueId, createUniqueId, encodeBegin, encodeChildren, encodeEnd, getAfterPhaseListener, getBeforePhaseListener, getFamily, getLocale, getPhaseListeners, getRenderKitId, getRendersChildren, getViewId, getViewListenersForEventClass, getViewMap, getViewMap, isInView, processApplication, processDecodes, processRestoreState, processUpdates, processValidators, queueEvent, removeComponentResource, removeComponentResource, removePhaseListener, restoreState, saveState, setAfterPhaseListener, setBeforePhaseListener, setInView, setLocale, setRenderKitId, setViewId, subscribeToViewEvent, unsubscribeFromViewEvent |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setValueExpression, visitTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceCapturingUIViewRoot()
| Method Detail |
|---|
public void addComponentResource(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent componentResource,
String target)
addComponentResource in class javax.faces.component.UIViewRootpublic List<javax.faces.component.UIComponent> getCapturedComponentResources(String target)
public List<javax.faces.component.UIComponent> getComponentResources(javax.faces.context.FacesContext context,
String target)
getComponentResources in class javax.faces.component.UIViewRoot
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||