Class DelegatingMetaTagHandler
- All Implemented Interfaces:
FaceletHandler
- Direct Known Subclasses:
ComponentHandler,FaceletsAttachedObjectHandler
public abstract class DelegatingMetaTagHandler extends MetaTagHandler
Enable the Jakarta Server Faces implementation to provide the
appropriate behavior for the kind of MetaTagHandler subclass for each kind of element in the view, while
providing a base-class from which those wanting to make a Java language custom tag handler can inherit. The Jakarta
Server Faces runtime provides the implementation of getTagHandlerDelegate() for the appropriate subclass.
-
Field Summary
Fields Modifier and Type Field Description protected TagHandlerDelegateFactorydelegateFactory -
Constructor Summary
Constructors Constructor Description DelegatingMetaTagHandler(TagConfig config) -
Method Summary
Modifier and Type Method Description voidapply(FaceletContext ctx, UIComponent parent)The default implementation simply calls through toTagHandlerDelegate.apply(jakarta.faces.view.facelets.FaceletContext, jakarta.faces.component.UIComponent).voidapplyNextHandler(FaceletContext ctx, UIComponent c)Invoke theapply()method on this instance'sTagHandler.nextHandler.protected MetaRulesetcreateMetaRuleset(Class type)The default implementation simply calls through toTagHandlerDelegate.createMetaRuleset(java.lang.Class)and returns the result.TagAttributegetBinding()TaggetTag()TagAttributegetTagAttribute(String localName)protected abstract TagHandlerDelegategetTagHandlerDelegate()Get the tag handler delegate.StringgetTagId()booleanisDisabled(FaceletContext ctx)voidsetAttributes(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 jakarta.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
Field Details
-
Constructor Details
-
Method Details
-
getTagHandlerDelegate
Get the tag handler delegate.
Code that extends from DelegatingMetaTagHandler (directly or indirectly, as through extending ComponentHandler) must take care to decorate, not replace, the TagHandlerDelegate instance returned by this method. Failure to do so may produce unexpected results.
- Returns:
- the tag handler delegate.
-
isDisabled
-
getBinding
-
getTag
-
getTagId
-
getTagAttribute
-
setAttributes
Description copied from class:MetaTagHandlerInvoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.- Overrides:
setAttributesin classMetaTagHandler- Parameters:
ctx- the Facelet context.instance- the instance.
-
apply
The default implementation simply calls through to
TagHandlerDelegate.apply(jakarta.faces.view.facelets.FaceletContext, jakarta.faces.component.UIComponent).- Parameters:
ctx- theFaceletContextfor this view executionparent- the parentUIComponentof the component represented by this element instance.- Throws:
IOException- if unable to loadrelativePath- Since:
- 2.0
-
applyNextHandler
public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException, FacesException, jakarta.el.ELExceptionInvoke the
apply()method on this instance'sTagHandler.nextHandler.- Parameters:
ctx- theFaceletContextfor this view executionc- theUIComponentof the component represented by this element instance.- Throws:
IOException- if thrown by the nextFaceletHandlerFaceletException- if thrown by the nextFaceletHandlerFacesException- if thrown by the nextFaceletHandlerjakarta.el.ELException- if thrown by the nextFaceletHandler- Since:
- 2.0
-
createMetaRuleset
The default implementation simply calls through to
TagHandlerDelegate.createMetaRuleset(java.lang.Class)and returns the result.- Specified by:
createMetaRulesetin classMetaTagHandler- Parameters:
type- theClassfor which theMetaRulesetmust be created.- Returns:
- the
MetaRuleset. - Since:
- 2.0
-