org.apache.myfaces.trinidadinternal.taglib
Class AttributeTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.apache.myfaces.trinidadinternal.taglib.AttributeTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class AttributeTag
extends javax.servlet.jsp.tagext.TagSupport

Author:
The Oracle ADF Faces Team

Tag implementation that adds an attribute with a specified name and value to the component whose tag it is nested inside, if the component does not already contain an attribute with the same name. This tag creates no output to the page currently being created.

This tag differs from the JSF f:attribute tag in that when the value attribute is bound to an EL expression, the EL expression is attached to the component as a value binding for later evaluation (unlike the JSF f:attribute tag which evaluates the expression immediately as discussed in this JSR127 bug). One other minor modification is that the name attribute cannot be EL-bound.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
AttributeTag()
           
 
Method Summary
 int doStartTag()
          Register the specified attribute name and value with the UIComponent instance associated with our most immediately surrounding UIComponentTag instance, if this UIComponent does not already have a value for the specified attribute name.
 void release()
          Release references to any acquired resources.
 void setName(java.lang.String name)
          Set the attribute name.
 void setValue(java.lang.String value)
          Set the attribute value.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeTag

public AttributeTag()
Method Detail

setName

public void setName(java.lang.String name)

Set the attribute name.

Parameters:
name - The new attribute name

setValue

public void setValue(java.lang.String value)

Set the attribute value.

Parameters:
value - The new attribute value

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException

Register the specified attribute name and value with the UIComponent instance associated with our most immediately surrounding UIComponentTag instance, if this UIComponent does not already have a value for the specified attribute name.

Note: When the value attribute is bound to an EL expression, the EL expression is attached to the component as a value binding for later evaluation (unlike the JSF f:attribute tag which evaluates the expression immediately).

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP error occurs

release

public void release()

Release references to any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.