Top Description Fields Constructors Methods
jakarta.faces.view.facelets

public abstract Class DelegatingMetaTagHandler

extends MetaTagHandler
Class Inheritance
Known Direct Subclasses
jakarta.faces.view.facelets.FaceletsAttachedObjectHandler, jakarta.faces.view.facelets.ComponentHandler
Imports
java.io.IOException, jakarta.el.ELException, jakarta.faces.FacesException, .FactoryFinder, jakarta.faces.component.UIComponent

Enable the Jakarta 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

Modifier and TypeField and Description
private final TagAttribute
protected TagHandlerDelegateFactory
delegateFactory

Class that defines methods relating to helping tag handler instances.

private final TagAttribute

Constructor Summary

AccessConstructor and Description
public
DelegatingMetaTagHandler(TagConfig
the config used to instantiate this handler.
config
)

Instantiates this handler with the given config.

Method Summary

Modifier and TypeMethod and Description
public void
apply(FaceletContext
the FaceletContext for this view execution
ctx
,
UIComponent
the parent UIComponent of the component represented by this element instance.
parent
)

Implements jakarta.faces.view.facelets.FaceletHandler.apply.

The default implementation simply calls through to TagHandlerDelegate#apply.

public void
applyNextHandler(FaceletContext
the FaceletContext for this view execution
ctx
,
UIComponent
the UIComponent of the component represented by this element instance.
c
)

Invoke the apply() method on this instance's TagHandler#nextHandler.

protected MetaRuleset
createMetaRuleset(Class<T>
the Class for which the MetaRuleset must be created.
type
)

Implements abstract jakarta.faces.view.facelets.MetaTagHandler.createMetaRuleset.

The default implementation simply calls through to TagHandlerDelegate#createMetaRuleset and returns the result.

public TagAttribute

Returns:

the "binding" attribute.
getBinding
()

Return the "binding" attribute.

public Tag

Returns:

a reference to the Tag instance.
getTag
()

Return a reference to the Tag instance corresponding to this TagHandler instance.

public TagAttribute

Returns:

the named attribute from the tag attributes.
getTagAttribute
(String
the name of the attribute.
localName
)

Return the named attribute from the tag attributes.

protected abstract TagHandlerDelegate

Returns:

the tag handler delegate.
getTagHandlerDelegate
()

Get the tag handler delegate.

public String

Returns:

the tag id from the TagConfig.
getTagId
()

Return the tag id from the TagConfig used to instantiate this handler.

public boolean

Returns:

true if the "disabled" attribute has been set to true, false otherwise.
isDisabled
(FaceletContext
the context used for resolving the underlying attribute.
ctx
)

Returns the value of the "disabled" attribute.

public void
setAttributes(FaceletContext
the Facelet context.
ctx
,
Object
the instance.
instance
)

Overrides jakarta.faces.view.facelets.MetaTagHandler.setAttributes.

Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.

Field Detail

bindingback to summary
private final TagAttribute binding
delegateFactoryback to summary
protected TagHandlerDelegateFactory delegateFactory

Class that defines methods relating to helping tag handler instances.

disabledback to summary
private final TagAttribute disabled

Constructor Detail

DelegatingMetaTagHandlerback to summary
public DelegatingMetaTagHandler(TagConfig config)

Instantiates this handler with the given config.

Parameters
config:TagConfig

the config used to instantiate this handler.

Method Detail

applyback to summary
public void apply(FaceletContext ctx, UIComponent parent) throws IOException

Implements jakarta.faces.view.facelets.FaceletHandler.apply.

The default implementation simply calls through to TagHandlerDelegate#apply.

Parameters
ctx:FaceletContext

the FaceletContext for this view execution

parent:UIComponent

the parent UIComponent of the component represented by this element instance.

Annotations
@Override
Exceptions
IOException:

Doc from jakarta.faces.view.facelets.FaceletHandler.apply.

if unable to load relativePath

Since
2.0
applyNextHandlerback to summary
public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException, FacesException, ELException

Invoke the apply() method on this instance's TagHandler#nextHandler.

Parameters
ctx:FaceletContext

the FaceletContext for this view execution

c:UIComponent

the UIComponent of the component represented by this element instance.

Exceptions
IOException:
if thrown by the next FaceletHandler
FacesException:
if thrown by the next FaceletHandler
ELException:
if thrown by the next FaceletHandler
FaceletException:
if thrown by the next FaceletHandler
Since
2.0
createMetaRulesetback to summary
protected MetaRuleset createMetaRuleset(Class<T> type)

Implements abstract jakarta.faces.view.facelets.MetaTagHandler.createMetaRuleset.

The default implementation simply calls through to TagHandlerDelegate#createMetaRuleset and returns the result.

Parameters
type:Class<T>

the Class for which the MetaRuleset must be created.

Returns:MetaRuleset

Doc from jakarta.faces.view.facelets.MetaTagHandler.createMetaRuleset.

the MetaRuleset.

Annotations
@Override
Since
2.0
getBindingback to summary
public TagAttribute getBinding()

Return the "binding" attribute.

Returns:TagAttribute

the "binding" attribute.

getTagback to summary
public Tag getTag()

Return a reference to the Tag instance corresponding to this TagHandler instance.

Returns:Tag

a reference to the Tag instance.

getTagAttributeback to summary
public TagAttribute getTagAttribute(String localName)

Return the named attribute from the tag attributes.

Parameters
localName:String

the name of the attribute.

Returns:TagAttribute

the named attribute from the tag attributes.

getTagHandlerDelegateback to summary
protected abstract TagHandlerDelegate 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:TagHandlerDelegate

the tag handler delegate.

getTagIdback to summary
public String getTagId()

Return the tag id from the TagConfig used to instantiate this handler.

Returns:String

the tag id from the TagConfig.

isDisabledback to summary
public boolean isDisabled(FaceletContext ctx)

Returns the value of the "disabled" attribute.

Parameters
ctx:FaceletContext

the context used for resolving the underlying attribute.

Returns:boolean

true if the "disabled" attribute has been set to true, false otherwise.

setAttributesback to summary
public void setAttributes(FaceletContext ctx, Object instance)

Overrides jakarta.faces.view.facelets.MetaTagHandler.setAttributes.

Doc from jakarta.faces.view.facelets.MetaTagHandler.setAttributes.

Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to the passed instance.

Parameters
ctx:FaceletContext

the Facelet context.

instance:Object

the instance.

Annotations
@Override