- java.lang.Object
-
- javax.faces.view.facelets.TagHandler
-
- javax.faces.view.facelets.MetaTagHandler
-
- All Implemented Interfaces:
- FaceletHandler
- Direct Known Subclasses:
- DelegatingMetaTagHandler
public abstract class MetaTagHandler extends TagHandler
Every kind of markup element in Facelets VDL that has attributes that need to take action on a JSF Java API artifact is associated with an instance of this class. This class is an abstraction to enable a rule based method for directing how different kinds of elements take different kinds of actions in the JSF Java API. For example, consider this markup:
<h:inputText value="#{user.userid}" valueChangeListener="#{user.newUserId}" />
This markup element corresponds to an instance of
HtmlInputText
in the view.HtmlImputText
has a number of attributes that are to be exposed to the page author.HtmlInputText
also implementsEditableValueHolder
, which extendsValueHolder
. Each of these interfaces also expose a number of attributes to the page author.Facelets employes the strategy pattern to allow the manner in which all possible attributes are handled based on the nature of the JSF Java API artifact associated with the markup element.
Subclasses override the
createMetaRuleset(java.lang.Class)
method to return aMetaRuleset
instance encapsulating all the strategies for all the attributes that make sense for this particular markup element. The runtime calls thesetAttributes(FaceletContext, Object)
method to cause those rules to be executed and applied.- Since:
- 2.0
-
-
Field Summary
-
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
-
-
Constructor Summary
Constructors Constructor and Description MetaTagHandler(TagConfig config)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description protected abstract MetaRuleset
createMetaRuleset(Class type)
Extend this method in order to add your own rules.protected void
setAttributes(FaceletContext ctx, Object instance)
Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.-
Methods inherited from class javax.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.faces.view.facelets.FaceletHandler
apply
-
-
-
-
Constructor Detail
-
MetaTagHandler
public MetaTagHandler(TagConfig config)
-
-
Method Detail
-
createMetaRuleset
protected abstract MetaRuleset createMetaRuleset(Class type)
Extend this method in order to add your own rules.- Parameters:
type
-
-
setAttributes
protected void setAttributes(FaceletContext ctx, Object instance)
Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.- Parameters:
ctx
-instance
-
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/faces/view/facelets/metataghandler.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.