Top Fields Constructors Methods
com.sun.faces.facelets.tag.faces

public final Class ComponentSupport

extends Object
Class Inheritance
Static Imports
com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter.PartialStateSaving

Author
Jacob Hookom
Version
$Id$

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_TO_TAG_MAP_NAME

Key to a FacesContext scoped Map where the keys are UIComponent instances and the values are Tag instances.

private static final String
public static final String
public static final String
public static final String
private static final String
private static final String
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addAllDescendantMarkIds(UIComponent component, Map<String, UIComponent> otherMarkIds)

Adds all specified otherMarkIds to the mark id cache of this component.

public static void
addComponent(FaceletContext ctx, UIComponent parent, UIComponent child)

Add the child component to the parent.

private static void
addSingleDescendantMarkId(UIComponent component, String markId, UIComponent otherComponent)

Adds the specified markId and its corresponding UIComponent otherComponent to the mark id cache of this component.

public static void
addToDescendantMarkIdCache(UIComponent component, UIComponent otherComponent)

Adds the mark id of the specified UIComponent otherComponent to the mark id cache of this component, including all its descendant mark ids.

public static void
public static void
encodeRecursive(FacesContext context, UIComponent viewToRender)

public static void
finalizeForDeletion(UIComponent
UIComponent to finalize
c
)

Used in conjunction with markForDeletion where any UIComponent marked will be removed.

public static UIComponent

Returns:

UIComponent found or null
findChild
(UIComponent
parent to start searching from
parent
,
String
to match to
id
)

A lighter-weight version of UIComponent's findChild.

public static UIComponent

Returns:

the UI component
findChildByTagId
(FacesContext context, UIComponent
the parent UI component
parent
,
String
the id
id
)

By TagId, find Child

private static UIComponent
public static UIComponent
private static Map<String, UIComponent>
public static String
public static Locale

Returns:

Locale found
getLocale
(FaceletContext
FaceletContext to evaluate from
ctx
,
TagAttribute
TagAttribute representing a Locale
attr
)

According to Faces 1.2 tag specs, this helper method will use the TagAttribute passed in determining the Locale intended.

public static Tag
public static UIViewRoot

Returns:

UIViewRoot instance for this evaluation
getViewRoot
(FaceletContext
FaceletContext
ctx
,
UIComponent
UIComponent to search from
parent
)

Tries to walk up the parent to find the UIViewRoot, if not found, then go to FaceletContext's FacesContext for the view root.

public static boolean
public static boolean
public static boolean
public static boolean
isNotRenderingResponse(FacesContext context)

Returns true if the given faces context is not FacesContext#isReleased(), and its current phase ID is not PhaseId#RENDER_RESPONSE.

private static boolean
public static void
markForDeletion(UIComponent
UIComponent to mark
c
)

Marks all direct children and Facets with an attribute for deletion.

private static void
removeAllDescendantMarkIds(UIComponent component, Map<String, UIComponent> otherMarkIds)

Removes all specified otherMarkIds from the mark id cache of this component.

public static void
removeFromDescendantMarkIdCache(UIComponent component, UIComponent otherComponent)

Removes the mark id of the specified UIComponent otherComponent from the mark id cache of this component, including all its descendant mark ids.

private static void
removeSingleDescendantMarkId(UIComponent component, String markId)

Removes the specified markId from the mark id cache of this component.

public static void
public static void
restoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, Object initialState, boolean restoreChildFacets)

public static void
restoreFullDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, boolean restoreChildFacets)

public static void
restoreTransientDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Map<String, Object> state, boolean restoreChildFacets)

public static Map<String, Object>
saveDescendantComponentStates(FacesContext facesContext, Map<String, Object> stateMap, Iterator<UIComponent> childIterator, BiFunction<UIComponent, FacesContext, Object> stateSaver, boolean saveChildFacets)

public static Collection<Object[]>
saveDescendantInitialComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, boolean saveChildFacets)

public static Tag
public static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMPONENT_TO_TAG_MAP_NAMEback to summary
public static final String COMPONENT_TO_TAG_MAP_NAME

Key to a FacesContext scoped Map where the keys are UIComponent instances and the values are Tag instances.

IMPLICIT_PANELback to summary
private static final String IMPLICIT_PANEL
MARK_CHILDREN_MODIFIEDback to summary
public static final String MARK_CHILDREN_MODIFIED
MARK_CREATEDback to summary
public static final String MARK_CREATED
MARK_CREATED_REMOVEDback to summary
public static final String MARK_CREATED_REMOVED
MARK_DELETEDback to summary
private static final String MARK_DELETED
MARK_ID_CACHEback to summary
private static final String MARK_ID_CACHE
REMOVED_CHILDRENback to summary
public static final String REMOVED_CHILDREN

Constructor Detail

ComponentSupportback to summary
public ComponentSupport()

Method Detail

addAllDescendantMarkIdsback to summary
private static void addAllDescendantMarkIds(UIComponent component, Map<String, UIComponent> otherMarkIds)

Adds all specified otherMarkIds to the mark id cache of this component. Changes are propagated up the component tree.

addComponentback to summary
public static void addComponent(FaceletContext ctx, UIComponent parent, UIComponent child)

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.

addSingleDescendantMarkIdback to summary
private static void addSingleDescendantMarkId(UIComponent component, String markId, UIComponent otherComponent)

Adds the specified markId and its corresponding UIComponent otherComponent to the mark id cache of this component. Changes are propagated up the component tree.

addToDescendantMarkIdCacheback to summary
public static void addToDescendantMarkIdCache(UIComponent component, UIComponent otherComponent)

Adds the mark id of the specified UIComponent otherComponent to the mark id cache of this component, including all its descendant mark ids. Changes are propagated up the component tree.

copyPassthroughAttributesback to summary
public static void copyPassthroughAttributes(FaceletContext ctx, UIComponent c, Tag t)
encodeRecursiveback to summary
public static void encodeRecursive(FacesContext context, UIComponent viewToRender) throws IOException, FacesException
finalizeForDeletionback to summary
public static void finalizeForDeletion(UIComponent c)

Used in conjunction with markForDeletion where any UIComponent marked will be removed.

Parameters
c:UIComponent

UIComponent to finalize

findChildback to summary
public static UIComponent findChild(UIComponent parent, String id)

A lighter-weight version of UIComponent's findChild.

Parameters
parent:UIComponent

parent to start searching from

id:String

to match to

Returns:UIComponent

UIComponent found or null

findChildByTagIdback to summary
public static UIComponent findChildByTagId(FacesContext context, UIComponent parent, String id)

By TagId, find Child

Parameters
parent:UIComponent

the parent UI component

id:String

the id

Returns:UIComponent

the UI component

findChildByTagIdFullStateSavingback to summary
private static UIComponent findChildByTagIdFullStateSaving(FacesContext context, UIComponent parent, String id)
findUIInstructionChildByTagIdback to summary
public static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id)
getDescendantMarkIdCacheback to summary
private static Map<String, UIComponent> getDescendantMarkIdCache(UIComponent component)
Annotations
@SuppressWarnings:unchecked
getFacetNameback to summary
public static String getFacetName(UIComponent parent)
getLocaleback to summary
public static Locale getLocale(FaceletContext ctx, TagAttribute attr) throws TagAttributeException

According to Faces 1.2 tag specs, this helper method will use the TagAttribute passed in determining the Locale intended.

Parameters
ctx:FaceletContext

FaceletContext to evaluate from

attr:TagAttribute

TagAttribute representing a Locale

Returns:Locale

Locale found

Exceptions
TagAttributeException:
if the Locale cannot be determined
getTagForComponentback to summary
public static Tag getTagForComponent(FacesContext context, UIComponent c)
getViewRootback to summary
public static UIViewRoot getViewRoot(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.

Parameters
ctx:FaceletContext

FaceletContext

parent:UIComponent

UIComponent to search from

Returns:UIViewRoot

UIViewRoot instance for this evaluation

handlerIsResourceRelatedback to summary
public static boolean handlerIsResourceRelated(ComponentHandler handler)
isBuildingNewComponentTreeback to summary
public static boolean isBuildingNewComponentTree(FacesContext context)
isImplicitPanelback to summary
public static boolean isImplicitPanel(UIComponent component)
isNotRenderingResponseback to summary
public static boolean isNotRenderingResponse(FacesContext context)

Returns true if the given faces context is not FacesContext#isReleased(), and its current phase ID is not PhaseId#RENDER_RESPONSE.

isPartialStateSavingback to summary
private static boolean isPartialStateSaving(FacesContext context)
markForDeletionback to summary
public static void markForDeletion(UIComponent c)

Marks all direct children and Facets with an attribute for deletion.

Parameters
c:UIComponent

UIComponent to mark

See Also
finalizeForDeletion(UIComponent)
removeAllDescendantMarkIdsback to summary
private static void removeAllDescendantMarkIds(UIComponent component, Map<String, UIComponent> otherMarkIds)

Removes all specified otherMarkIds from the mark id cache of this component. Changes are propagated up the component tree.

removeFromDescendantMarkIdCacheback to summary
public static void removeFromDescendantMarkIdCache(UIComponent component, UIComponent otherComponent)

Removes the mark id of the specified UIComponent otherComponent from the mark id cache of this component, including all its descendant mark ids. Changes are propagated up the component tree.

removeSingleDescendantMarkIdback to summary
private static void removeSingleDescendantMarkId(UIComponent component, String markId)

Removes the specified markId from the mark id cache of this component. Changes are propagated up the component tree.

removeTransientback to summary
public static void removeTransient(UIComponent c)
restoreFullDescendantComponentDeltaStatesback to summary
public static void restoreFullDescendantComponentDeltaStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, Object initialState, boolean restoreChildFacets)
restoreFullDescendantComponentStatesback to summary
public static void restoreFullDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Object state, boolean restoreChildFacets)
restoreTransientDescendantComponentStatesback to summary
public static void restoreTransientDescendantComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, Map<String, Object> state, boolean restoreChildFacets)
saveDescendantComponentStatesback to summary
public static Map<String, Object> saveDescendantComponentStates(FacesContext facesContext, Map<String, Object> stateMap, Iterator<UIComponent> childIterator, BiFunction<UIComponent, FacesContext, Object> stateSaver, boolean saveChildFacets)
saveDescendantInitialComponentStatesback to summary
public static Collection<Object[]> saveDescendantInitialComponentStates(FacesContext facesContext, Iterator<UIComponent> childIterator, boolean saveChildFacets)
setTagForComponentback to summary
public static Tag setTagForComponent(FacesContext context, UIComponent c, Tag t)
suppressViewModificationEventsback to summary
public static boolean suppressViewModificationEvents(FacesContext ctx)