public abstract class UIComponentELTag extends UIComponentClassicTagBase implements javax.servlet.jsp.tagext.Tag
UIComponentELTag
specializes its superclass to allow for
properties that take their values from Jakarta Expression Language expressions.
This tag is designed for use with Faces version 1.2 and Jakarta Server Pages version 2.1 containers.
bodyContent, pageContext, UNIQUE_ID_PREFIX
log
Constructor and Description |
---|
UIComponentELTag() |
Modifier and Type | Method and Description |
---|---|
protected UIComponent |
createComponent(FacesContext context,
String newId)
Create and return a new child component of the type returned by
calling
getComponentType() . |
protected javax.el.ELContext |
getELContext()
Return the
ELContext for the FacesContext for
this request. |
protected boolean |
hasBinding()
Return
true if this component has a
non-null binding attribute. |
void |
release()
Release any resources allocated during the execution of this
tag handler.
|
void |
setBinding(javax.el.ValueExpression binding)
Set the value expression for our component.
|
protected void |
setProperties(UIComponent component)
Override properties and attributes of the specified component,
if the corresponding properties of this tag handler instance were
explicitly set.
|
void |
setRendered(javax.el.ValueExpression rendered)
Set an override for the rendered attribute.
|
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, setupResponseWriter
getComponentType, getRendererType
public void setBinding(javax.el.ValueExpression binding) throws javax.servlet.jsp.JspException
Set the value expression for our component.
binding
- The new value expressionjavax.servlet.jsp.JspException
- if an error occursprotected boolean hasBinding()
UIComponentClassicTagBase
Return true
if this component has a
non-null
binding attribute. This method is
necessary to allow subclasses that expose the
binding
property as an Faces 1.1 style Expression Language property
as well as subclasses that expose it as a Jakarta Expression Language API property.
hasBinding
in class UIComponentClassicTagBase
public void setRendered(javax.el.ValueExpression rendered)
Set an override for the rendered attribute.
rendered
- The new value for rendered attributeprotected javax.el.ELContext getELContext()
Return the ELContext
for the FacesContext
for
this request.
This is a convenience for
getFacesContext().getELContext()
.
getELContext
in class UIComponentTagBase
FacesContext
public void release()
Release any resources allocated during the execution of this tag handler.
release
in interface javax.servlet.jsp.tagext.Tag
release
in class UIComponentClassicTagBase
protected void setProperties(UIComponent component)
Override 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 UIComponent
was in fact created during
the execution of this tag handler instance, and this call will occur
BEFORE the UIComponent
is 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 properties foo
and bar
would 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 the
rendered
property is specified for
this tag handler instance.rendererType
- Set if the getRendererType()
method returns a non-null value.setProperties
in class UIComponentClassicTagBase
component
- UIComponent
whose properties are to be
overriddenprotected UIComponent createComponent(FacesContext context, String newId) throws javax.servlet.jsp.JspException
Create and return a new child component of the type returned by
calling getComponentType()
. If this UIComponentELTag
has a non-null binding
attribute, this is done by
call Application.createComponent(java.lang.String)
with the ValueExpression
created for the binding
attribute, and the
ValueExpression
will be stored on the component. Otherwise,
Application.createComponent(java.lang.String)
is called with only
the component type. Finally, initialize the components id
and other properties.
createComponent
in class UIComponentClassicTagBase
context
- FacesContext
for the current requestnewId
- id of the componentjavax.servlet.jsp.JspException
- if the component cannot be createdComments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.