Class UIComponentTag
- All Implemented Interfaces:
BodyTag,IterationTag,JspIdConsumer,JspTag,Tag
- Direct Known Subclasses:
UIComponentBodyTag
UIComponentTag is the base class for all Jakarta Server Pages custom actions that correspond to user
interface components in a page that is rendered by Jakarta Server Faces.
In this version of the specification, UIComponentTag extends UIComponentClassicTagBase to add
properties that use the Faces 1.1 Expression Language.
-
Field Summary
Fields inherited from class jakarta.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIXFields inherited from class jakarta.faces.webapp.UIComponentTagBase
logFields inherited from interface jakarta.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAGFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected UIComponentcreateComponent(FacesContext context, String newId) Deprecated.ImplementcreateComponentusing Faces 1.1 EL API.static UIComponentTaggetParentUIComponentTag(PageContext context) Deprecated.Locate and return the nearest enclosingUIComponentTagif any; otherwise, returnnull.protected booleanDeprecated.Returntrueif this component has a non-nullbinding attribute.protected booleanDeprecated.static booleanisValueReference(String value) Deprecated.Returntrueif the specified value conforms to the syntax requirements of a value binding expression.voidrelease()Deprecated.Release any resources allocated during the execution of this tag handler.voidsetBinding(String binding) Deprecated.Set the value binding expression for our component.protected voidsetProperties(UIComponent component) Deprecated.Override properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set.voidsetRendered(String rendered) Deprecated.Set an override for the rendered attribute.Methods inherited from class jakarta.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doEndTag, doInitBody, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriterMethods inherited from class jakarta.faces.webapp.UIComponentTagBase
getComponentType, getELContext, getRendererTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, setPageContext, setParent
-
Constructor Details
-
UIComponentTag
public UIComponentTag()Deprecated.
-
-
Method Details
-
setBinding
Deprecated.Set the value binding expression for our component.
- Parameters:
binding- The new value binding expression- Throws:
IllegalArgumentException- if the specified binding is not a valid value binding expression.JspException- if the binding cannot be set
-
hasBinding
protected boolean hasBinding()Deprecated.Description copied from class:UIComponentClassicTagBaseReturn
trueif this component has a non-nullbinding attribute. This method is necessary to allow subclasses that expose thebindingproperty as an Faces 1.1 style Expression Language property as well as subclasses that expose it as a Jakarta Expression Language API property.- Specified by:
hasBindingin classUIComponentClassicTagBase- Returns:
- whether or not this component has a binding attribute
-
setRendered
Deprecated.Set an override for the rendered attribute.
- Parameters:
rendered- The new value for rendered attribute
-
isSuppressed
protected boolean isSuppressed()Deprecated. -
isValueReference
Deprecated.Return
trueif the specified value conforms to the syntax requirements of a value binding expression. Such expressions ` * may be used on most component tag attributes to signal a desire for deferred evaluation of the attribute or property value to be set on the underlyingUIComponent.- Parameters:
value- The value to evaluate- Returns:
- whether or not this value has the correct syntax for a value binding expression
- Throws:
NullPointerException- ifvalueisnull
-
release
public void release()Deprecated.Release any resources allocated during the execution of this tag handler.
- Specified by:
releasein interfaceTag- Overrides:
releasein classUIComponentClassicTagBase
-
setProperties
Deprecated.Description copied from class:UIComponentClassicTagBaseOverride properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set. This method must be called ONLY if the specified
UIComponentwas in fact created during the execution of this tag handler instance, and this call will occur BEFORE theUIComponentis added to the view.Tag subclasses that want to support additional set properties must ensure that the base class
setProperties()method is still called. A typical implementation that supports extra propertiesfooandbarwould look something like this:protected void setProperties(UIComponent component) { super.setProperties(component); if (foo != null) { component.setAttribute("foo", foo); } if (bar != null) { component.setAttribute("bar", bar); } }The default implementation overrides the following properties:
rendered- Set if a value for therenderedproperty is specified for this tag handler instance.rendererType- Set if thegetRendererType()method returns a non-null value.
- Specified by:
setPropertiesin classUIComponentClassicTagBase- Parameters:
component-UIComponentwhose properties are to be overridden
-
createComponent
Deprecated.Implement
createComponentusing Faces 1.1 EL API.- Specified by:
createComponentin classUIComponentClassicTagBase- Parameters:
context-FacesContextfor the current requestnewId- id of the component- Returns:
- the created component
-
getParentUIComponentTag
Deprecated.Locate and return the nearest enclosing
UIComponentTagif any; otherwise, returnnull.- Parameters:
context-PageContextfor the current page- Returns:
- the parent tag
-
UIComponentELTag, which extendsUIComponentClassicTagBaseto add properties that use the Jakarta Expression Language API introduced as part of Jakarta Server Pages 2.1.