UIComponentELTag
, which extends
UIComponentClassicTagBase
to add properties that use the
EL API introduced as part of JSP 2.1.public abstract class UIComponentTag extends UIComponentClassicTagBase implements Tag
UIComponentTag
is the base class for all JSP custom
actions that correspond to user interface components in a page that is
rendered by JavaServer Faces.
In this version of the specification, UIComponentTag
extends UIComponentClassicTagBase
to add properties that use
the Faces 1.1 Expression Language.
bodyContent, pageContext, UNIQUE_ID_PREFIX
log
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
Constructor and Description |
---|
UIComponentTag()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected UIComponent |
createComponent(FacesContext context,
String newId)
Deprecated.
Implement
createComponent using Faces 1.1 EL
API. |
static UIComponentTag |
getParentUIComponentTag(PageContext context)
Deprecated.
Locate and return the nearest enclosing
UIComponentTag
if any; otherwise, return null . |
protected boolean |
hasBinding()
Deprecated.
Return
true if this component has a
non-null binding attribute. |
protected boolean |
isSuppressed()
Deprecated.
|
static boolean |
isValueReference(String value)
Deprecated.
Return
true if the specified value conforms to the
syntax requirements of a value binding expression. |
void |
release()
Deprecated.
Release any resources allocated during the execution of this
tag handler.
|
void |
setBinding(String binding)
Deprecated.
Set the value binding expression for our component.
|
protected void |
setProperties(UIComponent component)
Deprecated.
Override properties and attributes of the specified component,
if the corresponding properties of this tag handler instance were
explicitly set.
|
void |
setRendered(String rendered)
Deprecated.
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, getELContext, getRendererType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doEndTag, doStartTag, getParent, setPageContext, setParent
public void setBinding(String binding) throws JspException
Set the value binding expression for our component.
binding
- The new value binding expressionIllegalArgumentException
- if the specified binding is not a
valid value binding expression.JspException
- if the binding cannot be setprotected 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 EL property
as well as subclasses that expose it as an EL API property.
hasBinding
in class UIComponentClassicTagBase
public void setRendered(String rendered)
Set an override for the rendered attribute.
rendered
- The new value for rendered attributeprotected boolean isSuppressed()
public static boolean isValueReference(String value)
Return true
if 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 underlying UIComponent
.
value
- The value to evaluateNullPointerException
- if value
is
null
public void release()
Release any resources allocated during the execution of this tag handler.
release
in interface Tag
release
in class UIComponentClassicTagBase
protected void setProperties(UIComponent component)
UIComponentClassicTagBase
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)
Implement createComponent
using Faces 1.1 EL
API.
createComponent
in class UIComponentClassicTagBase
context
- FacesContext
for the current requestnewId
- id of the componentpublic static UIComponentTag getParentUIComponentTag(PageContext context)
Locate and return the nearest enclosing UIComponentTag
if any; otherwise, return null
.
context
- PageContext
for the current pageCopyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.