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(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.faces.component.UIComponent parent,
jakarta.faces.component.UIComponent child)
Add the child component to the parent. |
static void |
addToDescendantMarkIdCache(jakarta.faces.component.UIComponent component,
jakarta.faces.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. |
static void |
copyPassthroughAttributes(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.faces.component.UIComponent c,
jakarta.faces.view.facelets.Tag t) |
static void |
encodeRecursive(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent viewToRender) |
static void |
finalizeForDeletion(jakarta.faces.component.UIComponent c)
Used in conjunction with markForDeletion where any UIComponent marked will be removed.
|
static jakarta.faces.component.UIComponent |
findChild(jakarta.faces.component.UIComponent parent,
String id)
A lighter-weight version of UIComponent's findChild.
|
static jakarta.faces.component.UIComponent |
findChildByTagId(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent parent,
String id)
By TagId, find Child
|
static jakarta.faces.component.UIComponent |
findUIInstructionChildByTagId(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent parent,
String id) |
static String |
getFacetName(jakarta.faces.component.UIComponent parent) |
static Locale |
getLocale(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.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 jakarta.faces.view.facelets.Tag |
getTagForComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent c) |
static jakarta.faces.component.UIViewRoot |
getViewRoot(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.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 boolean |
handlerIsResourceRelated(jakarta.faces.view.facelets.ComponentHandler handler) |
static boolean |
isBuildingNewComponentTree(jakarta.faces.context.FacesContext context) |
static boolean |
isImplicitPanel(jakarta.faces.component.UIComponent component) |
static boolean |
isNotRenderingResponse(jakarta.faces.context.FacesContext context)
Returns
true if the given faces context is not FacesContext.isReleased(),
and its current phase ID is not PhaseId.RENDER_RESPONSE. |
static void |
markForDeletion(jakarta.faces.component.UIComponent c)
Marks all direct children and Facets with an attribute for deletion.
|
static void |
removeFromDescendantMarkIdCache(jakarta.faces.component.UIComponent component,
jakarta.faces.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. |
static void |
removeTransient(jakarta.faces.component.UIComponent c) |
static jakarta.faces.view.facelets.Tag |
setTagForComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent c,
jakarta.faces.view.facelets.Tag t) |
static boolean |
suppressViewModificationEvents(jakarta.faces.context.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(jakarta.faces.view.facelets.ComponentHandler handler)
public static boolean isBuildingNewComponentTree(jakarta.faces.context.FacesContext context)
public static boolean isImplicitPanel(jakarta.faces.component.UIComponent component)
public static void finalizeForDeletion(jakarta.faces.component.UIComponent c)
c - UIComponent to finalizepublic static jakarta.faces.view.facelets.Tag setTagForComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent c,
jakarta.faces.view.facelets.Tag t)
public static jakarta.faces.view.facelets.Tag getTagForComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent c)
public static jakarta.faces.component.UIComponent findChild(jakarta.faces.component.UIComponent parent,
String id)
parent - parent to start searching fromid - to match topublic static jakarta.faces.component.UIComponent findUIInstructionChildByTagId(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent parent,
String id)
public static jakarta.faces.component.UIComponent findChildByTagId(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent parent,
String id)
parent - the parent UI componentid - the idpublic static void addToDescendantMarkIdCache(jakarta.faces.component.UIComponent component,
jakarta.faces.component.UIComponent otherComponent)
UIComponent otherComponent to the mark id cache of this component,
including all its descendant mark ids. Changes are propagated up the component tree.public static void removeFromDescendantMarkIdCache(jakarta.faces.component.UIComponent component,
jakarta.faces.component.UIComponent otherComponent)
UIComponent otherComponent from the mark id cache of this component,
including all its descendant mark ids. Changes are propagated up the component tree.public static boolean isNotRenderingResponse(jakarta.faces.context.FacesContext context)
true if the given faces context is not FacesContext.isReleased(),
and its current phase ID is not PhaseId.RENDER_RESPONSE.public static Locale getLocale(jakarta.faces.view.facelets.FaceletContext ctx, jakarta.faces.view.facelets.TagAttribute attr) throws jakarta.faces.view.facelets.TagAttributeException
ctx - FaceletContext to evaluate fromattr - TagAttribute representing a Localejakarta.faces.view.facelets.TagAttributeException - if the Locale cannot be determinedpublic static jakarta.faces.component.UIViewRoot getViewRoot(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.faces.component.UIComponent parent)
ctx - FaceletContextparent - UIComponent to search frompublic static void markForDeletion(jakarta.faces.component.UIComponent c)
c - UIComponent to markfinalizeForDeletion(UIComponent)public static void encodeRecursive(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent viewToRender)
throws IOException,
jakarta.faces.FacesException
IOExceptionjakarta.faces.FacesExceptionpublic static void removeTransient(jakarta.faces.component.UIComponent c)
public static void addComponent(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.faces.component.UIComponent parent,
jakarta.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 String getFacetName(jakarta.faces.component.UIComponent parent)
public static boolean suppressViewModificationEvents(jakarta.faces.context.FacesContext ctx)
public static void copyPassthroughAttributes(jakarta.faces.view.facelets.FaceletContext ctx,
jakarta.faces.component.UIComponent c,
jakarta.faces.view.facelets.Tag t)
Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.