java.lang.Object
com.sun.faces.facelets.tag.faces.ComponentSupport
- Version:
- $Id$
- Author:
- Jacob Hookom
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddComponent(FaceletContext ctx, UIComponent parent, UIComponent child) Add the child component to the parent.static voidaddToDescendantMarkIdCache(UIComponent component, UIComponent otherComponent) Adds the mark id of the specifiedUIComponentotherComponentto the mark id cache of this component, including all its descendant mark ids.static voidcopyPassthroughAttributes(FaceletContext ctx, UIComponent c, Tag t) static voidencodeRecursive(FacesContext context, UIComponent viewToRender) static voidUsed in conjunction with markForDeletion where any UIComponent marked will be removed.static UIComponentfindChild(UIComponent parent, String id) A lighter-weight version of UIComponent's findChild.static UIComponentfindChildByTagId(FacesContext context, UIComponent parent, String id) By TagId, find Childstatic UIComponentfindUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) static StringgetFacetName(UIComponent parent) static LocalegetLocale(FaceletContext ctx, TagAttribute attr) According to Faces 1.2 tag specs, this helper method will use the TagAttribute passed in determining the Locale intended.static TaggetTagForComponent(FacesContext context, UIComponent c) static UIViewRootgetViewRoot(FaceletContext ctx, UIComponent parent) Tries to walk up the parent to find the UIViewRoot, if not found, then go to FaceletContext's FacesContext for the view root.static booleanhandlerIsResourceRelated(ComponentHandler handler) static booleanisBuildingNewComponentTree(FacesContext context) static booleanisImplicitPanel(UIComponent component) static booleanisNotRenderingResponse(FacesContext context) Returnstrueif the given faces context is notFacesContext.isReleased(), and its current phase ID is notPhaseId.RENDER_RESPONSE.static voidMarks all direct children and Facets with an attribute for deletion.static voidremoveFromDescendantMarkIdCache(UIComponent component, UIComponent otherComponent) Removes the mark id of the specifiedUIComponentotherComponentfrom the mark id cache of this component, including all its descendant mark ids.static voidstatic voidrestoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, Object initialState, boolean restoreChildFacets) static voidrestoreFullDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, boolean restoreChildFacets) static voidrestoreTransientDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Map<String, Object> state, boolean restoreChildFacets) saveDescendantComponentStates(FacesContext facesContext, Map<String, Object> stateMap, Iterator<UIComponent> childIterator, BiFunction<UIComponent, FacesContext, Object> stateSaver, boolean saveChildFacets) static Collection<Object[]>saveDescendantInitialComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, boolean saveChildFacets) static TagsetTagForComponent(FacesContext context, UIComponent c, Tag t) static boolean
-
Field Details
-
MARK_CREATED
- See Also:
-
MARK_CHILDREN_MODIFIED
- See Also:
-
REMOVED_CHILDREN
- See Also:
-
MARK_CREATED_REMOVED
-
COMPONENT_TO_TAG_MAP_NAME
Key to a FacesContext scoped Map where the keys are UIComponent instances and the values are Tag instances.- See Also:
-
-
Constructor Details
-
ComponentSupport
public ComponentSupport()
-
-
Method Details
-
handlerIsResourceRelated
-
isBuildingNewComponentTree
-
isImplicitPanel
-
finalizeForDeletion
Used in conjunction with markForDeletion where any UIComponent marked will be removed.- Parameters:
c- UIComponent to finalize
-
setTagForComponent
-
getTagForComponent
-
findChild
A lighter-weight version of UIComponent's findChild.- Parameters:
parent- parent to start searching fromid- to match to- Returns:
- UIComponent found or null
-
findUIInstructionChildByTagId
public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id) -
findChildByTagId
By TagId, find Child- Parameters:
parent- the parent UI componentid- the id- Returns:
- the UI component
-
addToDescendantMarkIdCache
Adds the mark id of the specifiedUIComponentotherComponentto the mark id cache of this component, including all its descendant mark ids. Changes are propagated up the component tree. -
removeFromDescendantMarkIdCache
public static void removeFromDescendantMarkIdCache(UIComponent component, UIComponent otherComponent) Removes the mark id of the specifiedUIComponentotherComponentfrom the mark id cache of this component, including all its descendant mark ids. Changes are propagated up the component tree. -
isNotRenderingResponse
Returnstrueif the given faces context is notFacesContext.isReleased(), and its current phase ID is notPhaseId.RENDER_RESPONSE. -
getLocale
According to Faces 1.2 tag specs, this helper method will use the TagAttribute passed in determining the Locale intended.- Parameters:
ctx- FaceletContext to evaluate fromattr- TagAttribute representing a Locale- Returns:
- Locale found
- Throws:
TagAttributeException- if the Locale cannot be determined
-
getViewRoot
Tries to walk up the parent to find the UIViewRoot, if not found, then go to FaceletContext's FacesContext for the view root.- Parameters:
ctx- FaceletContextparent- UIComponent to search from- Returns:
- UIViewRoot instance for this evaluation
-
markForDeletion
Marks all direct children and Facets with an attribute for deletion.- Parameters:
c- UIComponent to mark- See Also:
-
encodeRecursive
public static void encodeRecursive(FacesContext context, UIComponent viewToRender) throws IOException, FacesException - Throws:
IOExceptionFacesException
-
removeTransient
-
addComponent
Add the child component to the parent. If the parent is a facet, check to see whether the facet is already defined. If it is, wrap the existing component in a panel group, if it's not already, then add the child to the panel group. If the facet does not yet exist, make the child the facet.
-
getFacetName
-
suppressViewModificationEvents
-
copyPassthroughAttributes
-
saveDescendantInitialComponentStates
public static Collection<Object[]> saveDescendantInitialComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, boolean saveChildFacets) -
saveDescendantComponentStates
public static Map<String,Object> saveDescendantComponentStates(FacesContext facesContext, Map<String, Object> stateMap, Iterator<UIComponent> childIterator, BiFunction<UIComponent, FacesContext, Object> stateSaver, boolean saveChildFacets) -
restoreFullDescendantComponentStates
public static void restoreFullDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, boolean restoreChildFacets) -
restoreFullDescendantComponentDeltaStates
public static void restoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, Object initialState, boolean restoreChildFacets) -
restoreTransientDescendantComponentStates
public static void restoreTransientDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Map<String, Object> state, boolean restoreChildFacets)
-