- java.lang.Object
-
- javax.faces.webapp.UIComponentTagBase
-
- javax.faces.webapp.UIComponentClassicTagBase
-
- javax.faces.webapp.UIComponentELTag
-
- All Implemented Interfaces:
- BodyTag, IterationTag, JspIdConsumer, JspTag, Tag
public abstract class UIComponentELTag extends UIComponentClassicTagBase implements Tag
UIComponentELTag
specializes its superclass to allow for properties that take their values from EL API expressions.This tag is designed for use with Faces version 1.2 and JSP version 2.1 containers.
-
-
Field Summary
-
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
-
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
-
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
-
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
-
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
-
-
Constructor Summary
Constructors Constructor and Description UIComponentELTag()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 callinggetComponentType()
.protected ELContext
getELContext()
Return theELContext
for theFacesContext
for this request.protected boolean
hasBinding()
Returntrue
if this component has a non-null
binding attribute.void
release()
Release any resources allocated during the execution of this tag handler.void
setBinding(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(ValueExpression rendered)
Set an override for the rendered attribute.-
Methods inherited from class javax.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, setupResponseWriter
-
Methods inherited from class javax.faces.webapp.UIComponentTagBase
getComponentType, getRendererType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, setPageContext, setParent
-
-
-
-
Method Detail
-
setBinding
public void setBinding(ValueExpression binding) throws JspException
Set the value expression for our component.
- Parameters:
binding
- The new value expression- Throws:
JspException
- if an error occurs
-
hasBinding
protected boolean hasBinding()
Description copied from class:UIComponentClassicTagBase
Return
true
if this component has a non-null
binding attribute. This method is necessary to allow subclasses that expose thebinding
property as an Faces 1.1 style EL property as well as subclasses that expose it as an EL API property.- Specified by:
hasBinding
in classUIComponentClassicTagBase
-
setRendered
public void setRendered(ValueExpression rendered)
Set an override for the rendered attribute.
- Parameters:
rendered
- The new value for rendered attribute
-
getELContext
protected ELContext getELContext()
Return the
ELContext
for theFacesContext
for this request.This is a convenience for
getFacesContext().getELContext()
.- Overrides:
getELContext
in classUIComponentTagBase
-
release
public void release()
Release any resources allocated during the execution of this tag handler.
- Specified by:
release
in interfaceTag
- Overrides:
release
in classUIComponentClassicTagBase
-
setProperties
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 theUIComponent
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 propertiesfoo
andbar
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 therendered
property is specified for this tag handler instance.rendererType
- Set if thegetRendererType()
method returns a non-null value.
- Specified by:
setProperties
in classUIComponentClassicTagBase
- Parameters:
component
-UIComponent
whose properties are to be overridden
-
createComponent
protected UIComponent createComponent(FacesContext context, String newId) throws JspException
Create and return a new child component of the type returned by calling
getComponentType()
. If thisUIComponentELTag
has a non-nullbinding
attribute, this is done by callApplication.createComponent(java.lang.String)
with theValueExpression
created for thebinding
attribute, and theValueExpression
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.- Specified by:
createComponent
in classUIComponentClassicTagBase
- Parameters:
context
-FacesContext
for the current requestnewId
- id of the component- Throws:
JspException
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/faces/webapp/UIComponentELTag.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.