javax.servlet.jsp.tagext
Class TagInfo
java.lang.Object
javax.servlet.jsp.tagext.TagInfo
public class TagInfo
extends java.lang.Object
Tag information for a tag in a Tag Library;
This class is instantiated from the Tag Library Descriptor file (TLD)
and is available only at translation time.
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo attributeInfo) - Constructor for TagInfo from data in the JSP 1.1 format for TLD.
|
TagInfo(java.lang.String tagName, java.lang.String tagClassName, java.lang.String bodycontent, java.lang.String infoString, TagLibraryInfo taglib, TagExtraInfo tagExtraInfo, TagAttributeInfo attributeInfo, java.lang.String displayName, java.lang.String smallIcon, java.lang.String largeIcon, TagVariableInfo[] tvi) - Constructor for TagInfo from data in the JSP 1.2 format for TLD.
|
BODY_CONTENT_EMPTY
public static final java.lang.String BODY_CONTENT_EMPTY
static constant for getBodyContent() when it is empty
- "EMPTY"
BODY_CONTENT_JSP
public static final java.lang.String BODY_CONTENT_JSP
static constant for getBodyContent() when it is JSP
- "JSP"
BODY_CONTENT_TAG_DEPENDENT
public static final java.lang.String BODY_CONTENT_TAG_DEPENDENT
static constant for getBodyContent() when it is Tag dependent
- "TAGDEPENDENT"
TagInfo
public TagInfo(java.lang.String tagName,
java.lang.String tagClassName,
java.lang.String bodycontent,
java.lang.String infoString,
TagLibraryInfo taglib,
TagExtraInfo tagExtraInfo,
TagAttributeInfo attributeInfo)
Constructor for TagInfo from data in the JSP 1.1 format for TLD.
This class is to be instantiated only from the TagLibrary code
under request from some JSP code that is parsing a
TLD (Tag Library Descriptor).
Note that, since TagLibibraryInfo reflects both TLD information
and taglib directive information, a TagInfo instance is
dependent on a taglib directive. This is probably a
design error, which may be fixed in the future.
tagName
- The name of this tagtagClassName
- The name of the tag handler classbodycontent
- Information on the body content of these tagsinfoString
- The (optional) string information for this tagtaglib
- The instance of the tag library that contains us.tagExtraInfo
- The instance providing extra Tag info. May be nullattributeInfo
- An array of AttributeInfo data from descriptor.
May be null;
TagInfo
public TagInfo(java.lang.String tagName,
java.lang.String tagClassName,
java.lang.String bodycontent,
java.lang.String infoString,
TagLibraryInfo taglib,
TagExtraInfo tagExtraInfo,
TagAttributeInfo attributeInfo,
java.lang.String displayName,
java.lang.String smallIcon,
java.lang.String largeIcon,
TagVariableInfo[] tvi)
Constructor for TagInfo from data in the JSP 1.2 format for TLD.
This class is to be instantiated only from the TagLibrary code
under request from some JSP code that is parsing a
TLD (Tag Library Descriptor).
Note that, since TagLibibraryInfo reflects both TLD information
and taglib directive information, a TagInfo instance is
dependent on a taglib directive. This is probably a
design error, which may be fixed in the future.
tagName
- The name of this tagtagClassName
- The name of the tag handler classbodycontent
- Information on the body content of these tagsinfoString
- The (optional) string information for this tagtaglib
- The instance of the tag library that contains us.tagExtraInfo
- The instance providing extra Tag info. May be nullattributeInfo
- An array of AttributeInfo data from descriptor.
May be null;displayName
- A short name to be displayed by toolssmallIcon
- Path to a small icon to be displayed by toolslargeIcon
- Path to a large icon to be displayed by tools
getAttributes
public TagAttributeInfo[] getAttributes()
Attribute information (in the TLD) on this tag.
The return is an array describing the attributes of this tag, as
indicated in the TLD.
A null return means no attributes.
- The array of TagAttributeInfo for this tag.
getBodyContent
public java.lang.String getBodyContent()
The bodycontent information for this tag.
- the body content string.
getDisplayName
public java.lang.String getDisplayName()
Get the displayName
- A short name to be displayed by tools
getInfoString
public java.lang.String getInfoString()
The information string for the tag.
- the info string
getLargeIcon
public java.lang.String getLargeIcon()
Get the path to the large icon
- Path to a large icon to be displayed by tools
getSmallIcon
public java.lang.String getSmallIcon()
Get the path to the small icon
- Path to a small icon to be displayed by tools
getTagClassName
public java.lang.String getTagClassName()
Name of the class that provides the handler for this tag.
- The name of the tag handler class.
getTagExtraInfo
public TagExtraInfo getTagExtraInfo()
The instance (if any) for extra tag information
- The TagExtraInfo instance, if any.
getTagLibrary
public TagLibraryInfo getTagLibrary()
The instance of TabLibraryInfo we belong to.
- the tab library instance we belong to.
getTagName
public java.lang.String getTagName()
The name of the Tag.
- The (short) name of the tag.
getTagVariableInfos
public TagVariableInfo[] getTagVariableInfos()
Get TagVariableInfo objects associated with this TagInfo
- A TagVariableInfo object associated with this
getVariableInfo
public VariableInfo[] getVariableInfo(TagData data)
Information on the scripting objects created by this tag at runtime.
This is a convenience method on the associated TagExtraInfo class.
Default is null if the tag has no "id" attribute,
otherwise, {"id", Object}
data
- TagData describing this action.
- Array of VariableInfo elements.
isValid
public boolean isValid(TagData data)
Translation-time validation of the attributes.
This is a convenience method on the associated TagExtraInfo class.
data
- The translation-time TagData instance.
- Whether the data is valid.
setTagExtraInfo
public void setTagExtraInfo(TagExtraInfo tei)
Set the instance for extra tag information
tei
- the TagExtraInfo instance
setTagLibrary
public void setTagLibrary(TagLibraryInfo tl)
Set the TagLibraryInfo property.
Note that a TagLibraryInfo element is dependent
not just on the TLD information but also on the
specific taglib instance used. This means that
a fair amount of work needs to be done to construct
and initialize TagLib objects.
If used carefully, this setter can be used to avoid having to
create new TagInfo elements for each taglib directive.
tl
- the TagLibraryInfo to assign
toString
public java.lang.String toString()
Stringify for debug purposes...