Constructor: |
public TagInfo(String tagName,
String tagClassName,
String bodycontent,
String infoString,
TagLibraryInfo taglib,
TagExtraInfo tagExtraInfo,
TagAttributeInfo[] attributeInfo) {
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
}
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. Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor.
May be null;
|
public TagInfo(String tagName,
String tagClassName,
String bodycontent,
String infoString,
TagLibraryInfo taglib,
TagExtraInfo tagExtraInfo,
TagAttributeInfo[] attributeInfo,
String displayName,
String smallIcon,
String largeIcon,
TagVariableInfo[] tvi) {
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
this.displayName = displayName;
this.smallIcon = smallIcon;
this.largeIcon = largeIcon;
this.tagVariableInfo = tvi;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
}
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. Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor.
May be null;
displayName - A short name to be displayed by tools
smallIcon - Path to a small icon to be displayed by tools
largeIcon - Path to a large icon to be displayed by tools
tvi - An array of a TagVariableInfo (or null)
|
public TagInfo(String tagName,
String tagClassName,
String bodycontent,
String infoString,
TagLibraryInfo taglib,
TagExtraInfo tagExtraInfo,
TagAttributeInfo[] attributeInfo,
String displayName,
String smallIcon,
String largeIcon,
TagVariableInfo[] tvi,
boolean dynamicAttributes) {
this.tagName = tagName;
this.tagClassName = tagClassName;
this.bodyContent = bodycontent;
this.infoString = infoString;
this.tagLibrary = taglib;
this.tagExtraInfo = tagExtraInfo;
this.attributeInfo = attributeInfo;
this.displayName = displayName;
this.smallIcon = smallIcon;
this.largeIcon = largeIcon;
this.tagVariableInfo = tvi;
this.dynamicAttributes = dynamicAttributes;
if (tagExtraInfo != null)
tagExtraInfo.setTagInfo(this);
}
Constructor for TagInfo from data in the JSP 2.0 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. Parameters:
tagName - The name of this tag
tagClassName - The name of the tag handler class
bodycontent - Information on the body content of these tags
infoString - The (optional) string information for this tag
taglib - The instance of the tag library that contains us.
tagExtraInfo - The instance providing extra Tag info. May be null
attributeInfo - An array of AttributeInfo data from descriptor.
May be null;
displayName - A short name to be displayed by tools
smallIcon - Path to a small icon to be displayed by tools
largeIcon - Path to a large icon to be displayed by tools
tvi - An array of a TagVariableInfo (or null)
dynamicAttributes - True if supports dynamic attributes
- since:
2.0 -
|
Method from javax.servlet.jsp.tagext.TagInfo Detail: |
public TagAttributeInfo[] getAttributes() {
return attributeInfo;
}
Attribute information (in the TLD) on this tag.
The return is an array describing the attributes of this tag, as
indicated in the TLD. |
public String getBodyContent() {
return bodyContent;
}
The bodycontent information for this tag.
If the bodycontent is not defined for this
tag, the default of JSP will be returned. |
public String getDisplayName() {
return displayName;
}
|
public String getInfoString() {
return infoString;
}
The information string for the tag. |
public String getLargeIcon() {
return largeIcon;
}
Get the path to the large icon. |
public String getSmallIcon() {
return smallIcon;
}
Get the path to the small icon. |
public String getTagClassName() {
return tagClassName;
}
Name of the class that provides the handler for this tag. |
public TagExtraInfo getTagExtraInfo() {
return tagExtraInfo;
}
The instance (if any) for extra tag information. |
public TagLibraryInfo getTagLibrary() {
return tagLibrary;
}
The instance of TabLibraryInfo we belong to. |
public String getTagName() {
return tagName;
}
|
public TagVariableInfo[] getTagVariableInfos() {
return tagVariableInfo;
}
Get TagVariableInfo objects associated with this TagInfo. |
public VariableInfo[] getVariableInfo(TagData data) {
VariableInfo[] result = null;
TagExtraInfo tei = getTagExtraInfo();
if (tei != null) {
result = tei.getVariableInfo( data );
}
return result;
}
Information on the scripting objects created by this tag at runtime.
This is a convenience method on the associated TagExtraInfo class. |
public boolean hasDynamicAttributes() {
return dynamicAttributes;
}
Get dynamicAttributes associated with this TagInfo. |
public boolean isValid(TagData data) {
TagExtraInfo tei = getTagExtraInfo();
if (tei == null) {
return true;
}
return tei.isValid(data);
}
Translation-time validation of the attributes.
This is a convenience method on the associated TagExtraInfo class. |
public void setTagExtraInfo(TagExtraInfo tei) {
tagExtraInfo = tei;
}
Set the instance for extra tag information. |
public void setTagLibrary(TagLibraryInfo tl) {
tagLibrary = 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. |
public ValidationMessage[] validate(TagData data) {
TagExtraInfo tei = getTagExtraInfo();
if( tei == null ) {
return null;
}
return tei.validate( data );
}
Translation-time validation of the attributes.
This is a convenience method on the associated TagExtraInfo class. |