org.apache.taglibs.page
Class AttributesTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.apache.taglibs.page.AttributesTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class AttributesTag
extends javax.servlet.jsp.tagext.BodyTagSupport

JSP Tag attributes, used to get PageContext attribute information using the standard JSP 1.2 <jsp:getProperty> tag.

The script variable of name id is availble only within the body of the attributes tag.

Loops through all the attributes in the PageContext.

JSP Tag Lib Descriptor

 <name>attributes</name>
 <tagclass>org.apache.taglibs.application.AttributesTag</tagclass>
 <teiclass>org.apache.taglibs.application.AttributesTEI</teiclass>
 <bodycontent>JSP</bodycontent>
 <info>Loop through all attributes or get a single attribute.</info>
   <attribute>
     <name>id</name>
     <required>true</required>
     <rtexprvalue>false</rtexprvalue>
   </attribute>
 

Author:
Morgan Delagrange
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
AttributesTag()
           
 
Method Summary
 int doAfterBody()
          Method called at end of each attributes tag.
 int doEndTag()
          Method called at end of Tag
 int doStartTag()
          Loops through all the attributes that came with the PageContext.
 java.lang.String getName()
          Returns the name of the attribute.
 java.lang.String getValue()
          Returns the value of the attribute.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

AttributesTag

public AttributesTag()
Method Detail

doStartTag

public final int doStartTag()
                     throws javax.servlet.jsp.JspException
Loops through all the attributes that came with the PageContext.

Returns:
SKIP_BODY if no attributes are found, EVAL_BODY_TAG if an attribute exists
Throws:
javax.servlet.jsp.JspException

doAfterBody

public final int doAfterBody()
                      throws javax.servlet.jsp.JspException
Method called at end of each attributes tag.

Returns:
EVAL_BODY_TAG if there is another attribute, or SKIP_BODY if there are no more attributes
Throws:
javax.servlet.jsp.JspException

doEndTag

public final int doEndTag()
                   throws javax.servlet.jsp.JspException
Method called at end of Tag

Returns:
EVAL_PAGE
Throws:
javax.servlet.jsp.JspException

getName

public final java.lang.String getName()
Returns the name of the attribute.

<jsp:getProperty name="id" property="name"/>

Returns:
String - attribute name

getValue

public final java.lang.String getValue()
Returns the value of the attribute.

<jsp:getProperty name="id" property="value"/>

Returns:
String - value of the attribute


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.