javax.faces.view.facelets

Class 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 implements EditableValueHolder, which extends ValueHolder. 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 a MetaRuleset instance encapsulating all the strategies for all the attributes that make sense for this particular markup element. The runtime calls the setAttributes(FaceletContext, Object) method to cause those rules to be executed and applied.

    Since:
    2.0
    • 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 -

Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/faces/view/facelets/metataghandler.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : https://docs.oracle.com

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.