Class ComponentSupport
java.lang.Object
org.apache.myfaces.view.facelets.tag.faces.ComponentSupport
- Version:
- $Id$
- Author:
- Jacob Hookom
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Special myfaces core marker to indicate the component is handled by a facelet tag handler, so its creation is not handled by user programatically and PSS remove listener should not register it when a remove happens.static final String
The key under the facelet state map is storedstatic final String
The UIPanel components, which are dynamically generated to serve as a container for facets with multiple non panel children, are marked with this attribute.static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFacet
(FaceletContext ctx, UIComponent parent, UIComponent c, String facetName) static void
encodeRecursive
(FacesContext context, UIComponent toRender) static UIComponent
findChild
(UIComponent parent, String id) A lighter-weight version of UIComponent's findChild.static UIComponent
findChildByTagId
(UIComponent parent, String id) By TagId, find Childstatic UIComponent
findChildInChildrenByTagId
(UIComponent parent, String id) static UIComponent
findChildInFacetByTagId
(UIComponent parent, String id, String facetName) static String
findChildInFacetsByTagId
(UIComponent parent, String id) static UIComponent
findComponentChildOrFacetFrom
(UIComponent parent, String id, String innerExpr) static UIComponent
findComponentChildOrFacetFrom
(FacesContext facesContext, UIComponent parent, String expr) static String
findFacetNameByComponentInstance
(UIComponent parent, UIComponent instance) static FaceletState
getFaceletState
(FaceletContext ctx, UIComponent parent, boolean create) static String
getFindComponentExpression
(FacesContext facesContext, UIComponent component) static Locale
getLocale
(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 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.static void
markComponentToRefreshDynamically
(FacesContext context, UIComponent component) static void
markComponentToRestoreFully
(FacesContext context, UIComponent component) static void
removeFacet
(FaceletContext ctx, UIComponent parent, UIComponent c, String facetName) static void
removeTransient
(UIComponent component) static Object
restoreInitialTagState
(FaceletContext ctx, FaceletCompositionContext fcc, UIComponent parent, String uniqueId) static void
saveInitialTagState
(FaceletContext ctx, FaceletCompositionContext fcc, UIComponent parent, String uniqueId, Object value) static void
setCachedFacesContext
(UIComponent component, FacesContext context)
-
Field Details
-
MARK_CREATED
- See Also:
-
FACET_CREATED_UIPANEL_MARKER
The UIPanel components, which are dynamically generated to serve as a container for facets with multiple non panel children, are marked with this attribute. This constant is duplicate in jakarta.faces.webapp.UIComponentClassicTagBase- See Also:
-
COMPONENT_ADDED_BY_HANDLER_MARKER
Special myfaces core marker to indicate the component is handled by a facelet tag handler, so its creation is not handled by user programatically and PSS remove listener should not register it when a remove happens.- See Also:
-
FACELET_STATE_INSTANCE
The key under the facelet state map is stored- See Also:
-
-
Constructor Details
-
ComponentSupport
public ComponentSupport()
-
-
Method Details
-
findChild
A lighter-weight version of UIComponent's findChild.- Parameters:
parent
- parent to start searching fromid
- to match to- Returns:
- UIComponent found or null
-
findFacetNameByComponentInstance
-
findChildInFacetByTagId
-
findChildInChildrenByTagId
-
findChildByTagId
By TagId, find Child- Parameters:
parent
-id
-- Returns:
-
findChildInFacetsByTagId
-
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
-
encodeRecursive
public static void encodeRecursive(FacesContext context, UIComponent toRender) throws IOException, FacesException - Throws:
IOException
FacesException
-
removeTransient
-
addFacet
public static void addFacet(FaceletContext ctx, UIComponent parent, UIComponent c, String facetName) -
removeFacet
public static void removeFacet(FaceletContext ctx, UIComponent parent, UIComponent c, String facetName) -
markComponentToRestoreFully
-
markComponentToRefreshDynamically
-
findComponentChildOrFacetFrom
public static UIComponent findComponentChildOrFacetFrom(FacesContext facesContext, UIComponent parent, String expr) -
findComponentChildOrFacetFrom
public static UIComponent findComponentChildOrFacetFrom(UIComponent parent, String id, String innerExpr) -
getFindComponentExpression
-
restoreInitialTagState
public static Object restoreInitialTagState(FaceletContext ctx, FaceletCompositionContext fcc, UIComponent parent, String uniqueId) -
saveInitialTagState
public static void saveInitialTagState(FaceletContext ctx, FaceletCompositionContext fcc, UIComponent parent, String uniqueId, Object value) -
getFaceletState
-
setCachedFacesContext
-