- java.lang.Object
-
- javax.servlet.jsp.tagext.TagData
-
- All Implemented Interfaces:
- Cloneable
public class TagData extends Object implements Cloneable
The (translation-time only) attribute/value information for a tag instance.TagData is only used as an argument to the isValid, validate, and getVariableInfo methods of TagExtraInfo, which are invoked at translation time.
-
-
Field Summary
Fields Modifier and Type Field and Description 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 TagData instances are used at translation-time).
-
Constructor Summary
Constructors Constructor and Description TagData(Hashtable<String,Object> attrs)
Constructor for a TagData.TagData(Object[][] atts)
Constructor for TagData.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Object
getAttribute(String attName)
The value of the attribute.Enumeration<String>
getAttributes()
Enumerates the attributes.String
getAttributeString(String attName)
Get the value for a given attribute.String
getId()
The value of the tag's id attribute.void
setAttribute(String attName, Object value)
Set the value of an attribute.
-
-
-
Field Detail
-
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 TagData instances are used at translation-time).
-
-
Constructor Detail
-
TagData
public TagData(Object[][] atts)
Constructor for TagData.A typical constructor may be
static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}}; static final TagData td = new TagData(att);
All values must be Strings except for those holding the distinguished object REQUEST_TIME_VALUE.- Parameters:
atts
- the static attribute and values. May be null.
-
-
Method Detail
-
getId
public String getId()
The value of the tag's id attribute.- Returns:
- the value of the tag's id attribute, or null if no such attribute was specified.
-
getAttribute
public Object getAttribute(String attName)
The value of the attribute. If a static value is specified for an attribute that accepts a request-time attribute expression then that static value is returned, even if the value is provided in the body of a <jsp:attribute> action. The distinguished object REQUEST_TIME_VALUE is only returned if the value is specified as a request-time attribute expression or via the <jsp:attribute> action with a body that contains dynamic content (scriptlets, scripting expressions, EL expressions, standard actions, or custom actions). Returns null if the attribute is not set.- Parameters:
attName
- the name of the attribute- Returns:
- the attribute's value
-
setAttribute
public void setAttribute(String attName, Object value)
Set the value of an attribute.- Parameters:
attName
- the name of the attributevalue
- the value.
-
getAttributeString
public String getAttributeString(String attName)
Get the value for a given attribute.- Parameters:
attName
- the name of the attribute- Returns:
- the attribute value string
- Throws:
ClassCastException
- if attribute value is not a String
-
getAttributes
public Enumeration<String> getAttributes()
Enumerates the attributes.- Returns:
- An enumeration of the attributes in a TagData
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/servlet/jsp/tagext/TagData.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.