- Direct Known Subclasses:
EditableValueHolderRule
,MethodRule
,RenderPropertyRule
The root class of the abstraction that dictates how attributes on a markup element in a Facelets VDL page are wired
to the Jakarta Faces API object instance associated with that element. The single method on this interface,
applyRule(java.lang.String, jakarta.faces.view.facelets.TagAttribute, jakarta.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:
<h:inputText value="#{user.userid}"
valueChangeListener="#{user.newUserId}" />
Two 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, jakarta.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(jakarta.faces.event.ValueChangeListener)
.
- Since:
- 2.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Metadata
applyRule
(String name, TagAttribute attribute, MetadataTarget meta) Return an abstraction that takes appropriate action given the kind of rule represented by the argumentname
, in the context of this particular concrete subclass ofMetaRule
.
-
Constructor Details
-
MetaRule
public MetaRule()
-
-
Method Details
-
applyRule
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.- Returns:
- the
Metadata
. - Since:
- 2.0
-