javax.servlet.jsp.tagext
Class TagData
java.lang.Object
javax.servlet.jsp.tagext.TagData
- Cloneable
public class TagData
extends java.lang.Object
implements Cloneable
Tag instance attribute(s)/value(s); often this data is fully static in the
case where none of the attributes have runtime expresssions as their values.
Thus this class is intended to expose an immutable interface to a set of
immutable attribute/value pairs.
This class is cloneable so implementations can create a static instance
and then just clone it before adding the request-time expressions.
static Object | REQUEST_TIME_VALUE - Distinguished value for an attribute to indicate its value
is a request-time expression which is not yet available because
this TagData instance is being used at translation-time.
|
TagData(Hashtable attrs) - Constructor for a TagData
If you already have the attributes in a hashtable, use this
constructor.
|
TagData(atts[][] ) - Constructor for a TagData
For simplicity and speed, we are just using primitive types.
|
REQUEST_TIME_VALUE
public static final Object REQUEST_TIME_VALUE
Distinguished value for an attribute to indicate its value
is a request-time expression which is not yet available because
this TagData instance is being used at translation-time.
TagData
public TagData(Hashtable attrs)
Constructor for a TagData
If you already have the attributes in a hashtable, use this
constructor.
TagData
public TagData(atts[][] )
Constructor for a TagData
For simplicity and speed, we are just using primitive types.
A typical constructor may be
static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}};
static final TagData td = new TagData(att);
In an implementation that uses the clonable approach sketched
above all values must be Strings except for those holding the
distinguished object REQUEST_TIME_VALUE.
getAttribute
public Object getAttribute(String attName)
- the attribute's value object. Returns the
distinguished object REQUEST_TIME_VALUE if the value is
request time and we are using TagData at translation time.
Returns null if the attribute is not set.
getAttributeString
public String getAttributeString(String attName)
- the attribute value string
getAttributes
public java.util.Enumeration getAttributes()
Enumerates the attributes
- An enumeration of the attributes in a TagData
getId
public String getId()
- the value of the id attribute or null
setAttribute
public void setAttribute(String attName,
Object value)
Set the value of this attribute to be
Copyright © 1999-2000 The Apache Software Foundation. All Rights Reserved.