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

public abstract Class TagHandler

extends Object
implements FaceletHandler
Class Inheritance
All Implemented Interfaces
jakarta.faces.view.facelets.FaceletHandler
Known Direct Subclasses
jakarta.faces.view.facelets.MetaTagHandler

Foundation class for FaceletHandlers associated with a markup element in a Facelet document. This class introduces the concept of XML attributes to Facelets. See the constructor documentation for more details.

Since
2.0

Field Summary

Modifier and TypeField and Description
protected final FaceletHandler
nextHandler

A reference to the FaceletHandler that represents the first nested child of this TagHandler instance.

protected final Tag
tag

A reference to the Tag instance corresponding to this TagHandler instance.

protected final String

Constructor Summary

AccessConstructor and Description
public
TagHandler(TagConfig
The structure that contains useful to the operation of this instance.
config
)

Every TagHandler instance is associated with a Tag.

Method Summary

Modifier and TypeMethod and Description
protected final TagAttribute

Returns:

TagAttribute if found, otherwise null
getAttribute
(String
name of attribute
localName
)

Utility method for fetching the appropriate TagAttribute

protected final TagAttribute

Returns:

TagAttribute if found, otherwise error
getRequiredAttribute
(String
name of the attribute
localName
)

Utility method for fetching a required TagAttribute

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nextHandlerback to summary
protected final FaceletHandler nextHandler

A reference to the FaceletHandler that represents the first nested child of this TagHandler instance.

tagback to summary
protected final Tag tag

A reference to the Tag instance corresponding to this TagHandler instance.

tagIdback to summary
protected final String tagId

See TagConfig#getTagId.

Constructor Detail

TagHandlerback to summary
public TagHandler(TagConfig config)

Every TagHandler instance is associated with a Tag. Each Tag instance has a TagAttributes property, which is simply a collection of TagAttribute instances. Extract and save as protected instance variables the TagConfig#getTagId, TagConfig#getTag and TagConfig#getNextHandler returns from the argument TagConfig. This constructor is only called when the Facelets View is compiled.

Parameters
config:TagConfig

The structure that contains useful to the operation of this instance.

Method Detail

getAttributeback to summary
protected final TagAttribute getAttribute(String localName)

Utility method for fetching the appropriate TagAttribute

Parameters
localName:String

name of attribute

Returns:TagAttribute

TagAttribute if found, otherwise null

getRequiredAttributeback to summary
protected final TagAttribute getRequiredAttribute(String localName) throws TagException

Utility method for fetching a required TagAttribute

Parameters
localName:String

name of the attribute

Returns:TagAttribute

TagAttribute if found, otherwise error

Exceptions
TagException:
if the attribute was not found
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override