public final class ComponentSupport extends Object
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_TO_TAG_MAP_NAME
Key to a FacesContext scoped Map where the keys are UIComponent instances and the
values are Tag instances.
|
static String |
MARK_CHILDREN_MODIFIED |
static String |
MARK_CREATED |
static String |
MARK_CREATED_REMOVED |
static String |
REMOVED_CHILDREN |
Constructor and Description |
---|
ComponentSupport() |
Modifier and Type | Method and Description |
---|---|
static void |
addComponent(FaceletContext ctx,
UIComponent parent,
UIComponent child)
Add the child component to the parent. |
static void |
copyPassthroughAttributes(FaceletContext ctx,
UIComponent c,
Tag t) |
static void |
encodeRecursive(FacesContext context,
UIComponent viewToRender) |
static void |
finalizeForDeletion(UIComponent c)
Used in conjunction with markForDeletion where any UIComponent marked
will be removed.
|
static UIComponent |
findChild(UIComponent parent,
String id)
A lighter-weight version of UIComponent's findChild.
|
static UIComponent |
findChildByTagId(FacesContext context,
UIComponent parent,
String id)
By TagId, find Child
|
static UIComponent |
findUIInstructionChildByTagId(FacesContext context,
UIComponent parent,
String id) |
static String |
getFacetName(UIComponent parent) |
static Locale |
getLocale(FaceletContext ctx,
TagAttribute attr)
According to JSF 1.2 tag specs, this helper method will use the
TagAttribute passed in determining the Locale intended.
|
static Tag |
getTagForComponent(FacesContext context,
UIComponent c) |
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 boolean |
handlerIsResourceRelated(ComponentHandler handler) |
static boolean |
isBuildingNewComponentTree(FacesContext context) |
static boolean |
isImplicitPanel(UIComponent component) |
static void |
markForDeletion(UIComponent c)
Marks all direct children and Facets with an attribute for deletion.
|
static void |
removeTransient(UIComponent c) |
static Tag |
setTagForComponent(FacesContext context,
UIComponent c,
Tag t) |
static boolean |
suppressViewModificationEvents(FacesContext ctx) |
public static final String MARK_CREATED
public static final String MARK_CHILDREN_MODIFIED
public static final String REMOVED_CHILDREN
public static final String MARK_CREATED_REMOVED
public static final String COMPONENT_TO_TAG_MAP_NAME
public static boolean handlerIsResourceRelated(ComponentHandler handler)
public static boolean isBuildingNewComponentTree(FacesContext context)
public static boolean isImplicitPanel(UIComponent component)
public static void finalizeForDeletion(UIComponent c)
c
- UIComponent to finalizepublic static Tag setTagForComponent(FacesContext context, UIComponent c, Tag t)
public static Tag getTagForComponent(FacesContext context, UIComponent c)
public static UIComponent findChild(UIComponent parent, String id)
parent
- parent to start searching fromid
- to match topublic static UIComponent findUIInstructionChildByTagId(FacesContext context, UIComponent parent, String id)
public static UIComponent findChildByTagId(FacesContext context, UIComponent parent, String id)
parent
- the parent UI componentid
- the idpublic static Locale getLocale(FaceletContext ctx, TagAttribute attr) throws TagAttributeException
ctx
- FaceletContext to evaluate fromattr
- TagAttribute representing a LocaleTagAttributeException
- if the Locale cannot be determinedpublic static UIViewRoot getViewRoot(FaceletContext ctx, UIComponent parent)
ctx
- FaceletContextparent
- UIComponent to search frompublic static void markForDeletion(UIComponent c)
c
- UIComponent to markfinalizeForDeletion(UIComponent)
public static void encodeRecursive(FacesContext context, UIComponent viewToRender) throws IOException, FacesException
IOException
FacesException
public static void removeTransient(UIComponent c)
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.
public static String getFacetName(UIComponent parent)
public static boolean suppressViewModificationEvents(FacesContext ctx)
public static void copyPassthroughAttributes(FaceletContext ctx, UIComponent c, Tag t)
Copyright © 1997–2019 Eclipse Foundation. All rights reserved.