Class UIComponentTagBase
- All Implemented Interfaces:
 jakarta.servlet.jsp.tagext.JspTag
- Direct Known Subclasses:
 UIComponentClassicTagBase
public abstract class UIComponentTagBase extends Object implements jakarta.servlet.jsp.tagext.JspTag
 UIComponentTagBase is the base class for all Jakarta Server Pages tags that correspond
 to a UIComponent instance in the view. This base class allows a single view to be
 described in a Jakarta Server Pages page consisting of both UIComponentELTag and UIComponentTag
 instances.
 
- 
Field Summary
 - 
Constructor Summary
Constructors Constructor Description UIComponentTagBase() - 
Method Summary
Modifier and Type Method Description protected abstract voidaddChild(UIComponent child)Add the component identifier of the specifiedUIComponentto the list of component identifiers created or located by nestedUIComponentTags processing this request.protected abstract voidaddFacet(String name)Add the facet name of the specified facet to the list of facet names created or located by nestedUIComponentTags processing this request.abstract UIComponentgetComponentInstance()Return theUIComponentinstance that is associated with this tag instance.abstract StringgetComponentType()Return the component type for the component that is or will be bound to this tag.abstract booleangetCreated()Returntrueif we dynamically created a new component instance during execution of this tag.protected jakarta.el.ELContextgetELContext()Return theELContextfor theFacesContextfor this request.protected abstract FacesContextgetFacesContext()Return theFacesContextinstance for the current request.protected abstract intgetIndexOfNextChildTag()Return the index of the next child to be added as a child of this tag.abstract StringgetRendererType()Return therendererTypeproperty that selects theRendererto be used for encoding this component, ornullto ask the component to render itself directly.abstract voidsetId(String id)Set the component identifier for the component corresponding to this tag instance. 
- 
Field Details
 - 
Constructor Details
- 
UIComponentTagBase
public UIComponentTagBase() 
 - 
 - 
Method Details
- 
getFacesContext
Return the
FacesContextinstance for the current request. This value will be non-nullonly from the beginning ofdoStartTag()through the end ofdoEndTag()for each tag instance.- Returns:
 - the 
FacesContextfor the current request. 
 - 
getELContext
protected jakarta.el.ELContext getELContext()Return the
ELContextfor theFacesContextfor this request.This is a convenience for
getFacesContext().getELContext().- Returns:
 - the {code ELContext} for this 
FacesContext 
 - 
addChild
Add the component identifier of the specified
UIComponentto the list of component identifiers created or located by nestedUIComponentTags processing this request.- Parameters:
 child- New child whose identifier should be added
 - 
addFacet
Add the facet name of the specified facet to the list of facet names created or located by nested
UIComponentTags processing this request.- Parameters:
 name- Facet name to be added
 - 
setId
Set the component identifier for the component corresponding to this tag instance. If the argument begins with
UIViewRoot.UNIQUE_ID_PREFIXthrow anIllegalArgumentException- Parameters:
 id- The new component identifier. This may not start withUIViewRoot.UNIQUE_ID_PREFIX.- Throws:
 IllegalArgumentException- if the argument is non-nulland starts withUIViewRoot.UNIQUE_ID_PREFIX.
 - 
getComponentType
Return the component type for the component that is or will be bound to this tag. This value can be passed to
Application.createComponent(java.lang.String)to create theUIComponentinstance for this tag. Subclasses must override this method to return the appropriate value.- Returns:
 - the component type
 
 - 
getRendererType
Return the
rendererTypeproperty that selects theRendererto be used for encoding this component, ornullto ask the component to render itself directly. Subclasses must override this method to return the appropriate value.- Returns:
 - the renderer type
 
 - 
getComponentInstance
Return the
UIComponentinstance that is associated with this tag instance. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution ofdoStartTag()anddoEndTag()on this tag instance.- Returns:
 - the component
 
 - 
getCreated
public abstract boolean getCreated()Return
trueif we dynamically created a new component instance during execution of this tag. This method is designed to be used by tags nested within this tag, and only returns useful results between the execution ofdoStartTag()anddoEndTag()on this tag instance.- Returns:
 - the result as specified above
 
 - 
getIndexOfNextChildTag
protected abstract int getIndexOfNextChildTag()Return the index of the next child to be added as a child of this tag. The default implementation maintains a list of created components and returns the size of the list.
- Returns:
 - the index
 
 
 -