- java.lang.Object
-
- javax.faces.view.facelets.TagAttribute
-
public abstract class TagAttribute extends Object
Representation of an XML attribute name=value pair on an XML element in a Facelet file.
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description TagAttribute()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract boolean
getBoolean(FaceletContext ctx)
If literal, returnBoolean.getBoolean(java.lang.String)
passing our value, otherwise callgetObject(FaceletContext, Class)
.abstract int
getInt(FaceletContext ctx)
If literal, callInteger.parseInt(String)
, otherwise callgetObject(FaceletContext, Class)
.abstract String
getLocalName()
Local name of this attributeabstract Location
getLocation()
The location of this attribute in the FaceletContextabstract MethodExpression
getMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes)
Create a MethodExpression, using this attribute's value as the expression String.abstract String
getNamespace()
The resolved Namespace for this attributeabstract Object
getObject(FaceletContext ctx)
Delegates to getObject with Object.class as a paramabstract Object
getObject(FaceletContext ctx, Class type)
If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.abstract String
getQName()
The qualified name for this attributeTag
getTag()
A reference to the Tag for which this class represents the attributes.
abstract String
getValue()
Return the literal value of this attributeabstract String
getValue(FaceletContext ctx)
If literal, then return our value, otherwise delegate to getObject, passing String.class.abstract ValueExpression
getValueExpression(FaceletContext ctx, Class type)
Create a ValueExpression, using this attribute's literal value and the passed expected type.abstract boolean
isLiteral()
If this TagAttribute is literal (not #{..} or ${..})void
setTag(Tag tag)
Set a reference to the Tag for which this class represents the attributes.
-
-
-
Method Detail
-
getBoolean
public abstract boolean getBoolean(FaceletContext ctx)
If literal, returnBoolean.getBoolean(java.lang.String)
passing our value, otherwise callgetObject(FaceletContext, Class)
.- Parameters:
ctx
- FaceletContext to use- Returns:
- boolean value
- See Also:
Boolean.getBoolean(java.lang.String)
,getObject(FaceletContext, Class)
-
getInt
public abstract int getInt(FaceletContext ctx)
If literal, callInteger.parseInt(String)
, otherwise callgetObject(FaceletContext, Class)
.- Parameters:
ctx
- FaceletContext to use- Returns:
- int value
- See Also:
Integer.parseInt(java.lang.String)
,getObject(FaceletContext, Class)
-
getLocalName
public abstract String getLocalName()
Local name of this attribute- Returns:
- local name of this attribute
-
getLocation
public abstract Location getLocation()
The location of this attribute in the FaceletContext- Returns:
- the TagAttribute's location
-
getMethodExpression
public abstract MethodExpression getMethodExpression(FaceletContext ctx, Class type, Class[] paramTypes)
Create a MethodExpression, using this attribute's value as the expression String.- Parameters:
ctx
- FaceletContext to usetype
- expected return typeparamTypes
- parameter type- Returns:
- a MethodExpression instance
- See Also:
ExpressionFactory.createMethodExpression(javax.el.ELContext, java.lang.String, java.lang.Class, java.lang.Class[])
,MethodExpression
-
getNamespace
public abstract String getNamespace()
The resolved Namespace for this attribute- Returns:
- resolved Namespace
-
getObject
public abstract Object getObject(FaceletContext ctx)
Delegates to getObject with Object.class as a param- Parameters:
ctx
- FaceletContext to use- Returns:
- Object representation of this attribute's value
- See Also:
getObject(FaceletContext, Class)
-
getQName
public abstract String getQName()
The qualified name for this attribute- Returns:
- the qualified name for this attribute
-
getValue
public abstract String getValue()
Return the literal value of this attribute- Returns:
- literal value
-
getValue
public abstract String getValue(FaceletContext ctx)
If literal, then return our value, otherwise delegate to getObject, passing String.class.- Parameters:
ctx
- FaceletContext to use- Returns:
- String value of this attribute
- See Also:
getObject(FaceletContext, Class)
-
getObject
public abstract Object getObject(FaceletContext ctx, Class type)
If literal, simply coerce our String literal value using an ExpressionFactory, otherwise create a ValueExpression and evaluate it.- Parameters:
ctx
- FaceletContext to usetype
- expected return type- Returns:
- Object value of this attribute
- See Also:
ExpressionFactory.coerceToType(java.lang.Object, java.lang.Class)
,ExpressionFactory.createValueExpression(javax.el.ELContext, java.lang.String, java.lang.Class)
,ValueExpression
-
getValueExpression
public abstract ValueExpression getValueExpression(FaceletContext ctx, Class type)
Create a ValueExpression, using this attribute's literal value and the passed expected type.- Parameters:
ctx
- FaceletContext to usetype
- expected return type- Returns:
- ValueExpression instance
- See Also:
ExpressionFactory.createValueExpression(javax.el.ELContext, java.lang.String, java.lang.Class)
,ValueExpression
-
isLiteral
public abstract boolean isLiteral()
If this TagAttribute is literal (not #{..} or ${..})- Returns:
- true if this attribute is literal
-
getTag
public Tag getTag()
A reference to the Tag for which this class represents the attributes. For compatibility with previous implementations, an implementation is provided that returns
null
.- Returns:
- the
Tag
for which this class represents the attributes. - Since:
- 2.2
-
setTag
public void setTag(Tag tag)
Set a reference to the Tag for which this class represents the attributes. The VDL runtime must ensure that this method is called before any
FaceletHandler
s for this element are instantiated. For compatibility with previous implementations, a no-op implementation is provided.- Since:
- 2.2
-
-
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/faces/view/facelets/tagattribute.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.