Class AttributeTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.myfaces.taglib.core.AttributeTag
-
- All Implemented Interfaces:
Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
@JSFJspTag(name="f:attribute", bodyContent="empty") public class AttributeTag extends javax.servlet.jsp.tagext.TagSupport
This tag associates an attribute with the nearest parent UIComponent.When the value is not an EL expression, this tag has the same effect as calling component.getAttributes.put(name, value). When the attribute name specified matches a standard property of the component, that property is set. However it is also valid to assign attributes to components using any arbitrary name; the component itself won't make any use of these but other objects such as custom renderers, validators or action listeners can later retrieve the attribute from the component by name.
When the value is an EL expression, this tag has the same effect as calling component.setValueBinding. A call to method component.getAttributes().get(name) will then cause that expression to be evaluated and the result of the expression is returned, not the original EL expression string.
See the javadoc for UIComponent.getAttributes for more details.
Unless otherwise specified, all attributes accept static values or EL expressions.
- Version:
- $Revision$ $Date$
- Author:
- Manfred Geiler (latest modification by $Author$), Bruno Aranda (JSR-252)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doStartTag()
void
release()
void
setName(javax.el.ValueExpression nameExpression)
The name of the attribute.void
setValue(javax.el.ValueExpression valueExpression)
The attribute's value.
-
-
-
Method Detail
-
setName
@JSFJspAttribute(className="javax.el.ValueExpression", deferredValueType="java.lang.String") public void setName(javax.el.ValueExpression nameExpression)
The name of the attribute.- Parameters:
nameExpression
-
-
setValue
@JSFJspAttribute(className="javax.el.ValueExpression", deferredValueType="java.lang.Object") public void setValue(javax.el.ValueExpression valueExpression)
The attribute's value.- Parameters:
valueExpression
-
-
doStartTag
public int doStartTag() throws javax.servlet.jsp.JspException
- Specified by:
doStartTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doStartTag
in classjavax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.TagSupport
-
-