com.sun.faces.facelets.tag.jsf
public final class ComponentSupport extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.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 java.lang.String |
IMPLICIT_PANEL |
static java.lang.String |
MARK_CREATED |
private static java.lang.String |
MARK_DELETED |
Constructor and Description |
---|
ComponentSupport() |
Modifier and Type | Method and Description |
---|---|
static void |
addComponent(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
javax.faces.component.UIComponent child)
Add the child component to the parent. |
static void |
encodeRecursive(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent viewToRender) |
static void |
finalizeForDeletion(javax.faces.component.UIComponent c)
Used in conjunction with markForDeletion where any UIComponent marked
will be removed.
|
static javax.faces.component.UIComponent |
findChild(javax.faces.component.UIComponent parent,
java.lang.String id)
A lighter-weight version of UIComponent's findChild.
|
static javax.faces.component.UIComponent |
findChildByTagId(javax.faces.component.UIComponent parent,
java.lang.String id)
By TagId, find Child
|
static java.util.concurrent.ConcurrentHashMap<java.lang.String,javax.faces.component.UIComponent> |
getFaceletComponentMap() |
static java.lang.String |
getFacetName(javax.faces.component.UIComponent parent) |
static java.util.Locale |
getLocale(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.view.facelets.TagAttribute attr)
According to JSF 1.2 tag specs, this helper method will use the
TagAttribute passed in determining the Locale intended.
|
static javax.faces.view.facelets.Tag |
getTagForComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent c) |
static javax.faces.component.UIViewRoot |
getViewRoot(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.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 |
markForDeletion(javax.faces.component.UIComponent c)
Marks all direct children and Facets with an attribute for deletion.
|
static void |
removeTransient(javax.faces.component.UIComponent c) |
static javax.faces.view.facelets.Tag |
setTagForComponent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent c,
javax.faces.view.facelets.Tag t) |
static boolean |
suppressViewModificationEvents(javax.faces.context.FacesContext ctx) |
private static final java.lang.String MARK_DELETED
public static final java.lang.String MARK_CREATED
private static final java.lang.String IMPLICIT_PANEL
public static final java.lang.String COMPONENT_TO_TAG_MAP_NAME
public static void finalizeForDeletion(javax.faces.component.UIComponent c)
c
- UIComponent to finalizepublic static javax.faces.view.facelets.Tag setTagForComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent c, javax.faces.view.facelets.Tag t)
public static javax.faces.view.facelets.Tag getTagForComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent c)
public static javax.faces.component.UIComponent findChild(javax.faces.component.UIComponent parent, java.lang.String id)
parent
- parent to start searching fromid
- to match topublic static javax.faces.component.UIComponent findChildByTagId(javax.faces.component.UIComponent parent, java.lang.String id)
parent
- the parent UI componentid
- the idpublic static java.util.concurrent.ConcurrentHashMap<java.lang.String,javax.faces.component.UIComponent> getFaceletComponentMap()
public static java.util.Locale getLocale(javax.faces.view.facelets.FaceletContext ctx, javax.faces.view.facelets.TagAttribute attr) throws javax.faces.view.facelets.TagAttributeException
ctx
- FaceletContext to evaluate fromattr
- TagAttribute representing a Localejavax.faces.view.facelets.TagAttributeException
- if the Locale cannot be determinedpublic static javax.faces.component.UIViewRoot getViewRoot(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent)
ctx
- FaceletContextparent
- UIComponent to search frompublic static void markForDeletion(javax.faces.component.UIComponent c)
c
- UIComponent to markfinalizeForDeletion(UIComponent)
public static void encodeRecursive(javax.faces.context.FacesContext context, javax.faces.component.UIComponent viewToRender) throws java.io.IOException, javax.faces.FacesException
java.io.IOException
javax.faces.FacesException
public static void removeTransient(javax.faces.component.UIComponent c)
public static void addComponent(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent, javax.faces.component.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 java.lang.String getFacetName(javax.faces.component.UIComponent parent)
public static boolean suppressViewModificationEvents(javax.faces.context.FacesContext ctx)
Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.