- java.lang.Object
-
- javax.faces.view.facelets.MetaRule
-
public abstract class MetaRule extends Object
The root class of the abstraction that dictates how attributes on a markup element in a Facelets VDL page are wired to the JSF API object instance associated with that element. The single method on this interface,
applyRule(java.lang.String, javax.faces.view.facelets.TagAttribute, javax.faces.view.facelets.MetadataTarget)
, returns an encapsulation of the behavior that actually does the work of handling the attribute and its value. There are implementations of specific concrete subclasses of this class for all the basic kinds of elements that appear in Facelets VDL pages: components, non-components, and attached objects.For example, consider this markup:
Two<h:inputText value="#{user.userid}" valueChangeListener="#{user.newUserId}" />
MetaRule
instances are involved in this example.The first has an
applyRule()
method that returns aMetadata
instance that, when itsapplyMetada()
method is called, dictates how the "value" attribute is processed: callingUIComponent.setValueExpression(java.lang.String, javax.el.ValueExpression)
on theUIComponent
instance associated with the<h:inputText>
element.The second has an
applyRule()
method that returns aMetadata
instance that, when itsapplyMetadata()
method is called, dictates how the "valueChangeListener" attribute is processed: callingEditableValueHolder.addValueChangeListener(javax.faces.event.ValueChangeListener)
.
- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description MetaRule()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description abstract Metadata
applyRule(String name, TagAttribute attribute, MetadataTarget meta)
Return an abstraction that takes appropriate action given the kind of rule represented by the argument
name
, in the context of this particular concrete subclass ofMetaRule
.
-
-
-
Method Detail
-
applyRule
public abstract Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta)
Return an abstraction that takes appropriate action given the kind of rule represented by the argument
name
, in the context of this particular concrete subclass ofMetaRule
. The abstraction must encapsulate the value from the argumentattribute
.- Parameters:
name
- the name for this rule. This will generally be the name of a tag attribute in the VDL.attribute
- the name/value pair for this attribute on this particular instance of an element in the page.meta
- theMetadataTarged
that can be used to discern what kind of action to encapsulate within the abstraction to be returned.- Since:
- 2.0
-
-
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/metarule.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.