Top Description Fields Constructors Methods
com.sun.faces.facelets.tag

pack-priv final Class UserTagHandler

extends TagHandlerImpl
implements TemplateClient
Class Inheritance
All Implemented Interfaces
com.sun.faces.facelets.TemplateClient
Imports
java.io.FileNotFoundException, .IOException, java.net.URL, java.util.HashMap, .Iterator, .Map, com.sun.faces.facelets.FaceletContextImplBase, .TemplateClient, com.sun.faces.facelets.el.VariableMapperWrapper, com.sun.faces.facelets.tag.ui.DefineHandler, jakarta.el.VariableMapper, jakarta.faces.component.UIComponent, jakarta.faces.view.facelets.FaceletContext, .TagAttribute, .TagConfig, .TagException

A Tag that is specified in a FaceletFile. Takes all attributes specified and sets them on the FaceletContext before including the targeted Facelet file.
Author
Jacob Hookom
Version
$Id$

Field Summary

Modifier and TypeField and Description
protected final Map<K, V>
protected final URL
protected final TagAttribute[]

Constructor Summary

AccessConstructor and Description
public
UserTagHandler(TagConfig config, URL location)

Method Summary

Modifier and TypeMethod and Description
public void
apply(FaceletContext
the current FaceletContext instance for this execution
ctxObj
,
UIComponent
the parent UIComponent to operate upon
parent
)

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

Iterate over all TagAttributes and set them on the FaceletContext's VariableMapper, then include the target Facelet.

public boolean
apply(FaceletContext
the FaceletContext of your instance, not the templates'
ctx
,
UIComponent
current UIComponent instance to be applied
parent
,
String
the String name or null if the whole body should be included
name
)

Implements com.sun.faces.facelets.TemplateClient.apply.

This contract is much like the normal FaceletHandler.apply method, but it takes in an optional String name which tells this instance what fragment/definition it's looking for.

Inherited from com.sun.faces.facelets.tag.TagHandlerImpl:
findNextByTypefindNextByType

Field Detail

handlersback to summary
protected final Map<K, V> handlers
locationback to summary
protected final URL location
varsback to summary
protected final TagAttribute[] vars

Constructor Detail

UserTagHandlerback to summary
public UserTagHandler(TagConfig config, URL location)

Method Detail

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

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

Iterate over all TagAttributes and set them on the FaceletContext's VariableMapper, then include the target Facelet. Finally, replace the old VariableMapper.

Parameters
ctxObj:FaceletContext

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

the current FaceletContext instance for this execution

parent:UIComponent

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

the parent UIComponent to operate upon

Annotations
@Override
Exceptions
IOException:

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

if unable to load relativePath

See Also
TagAttribute#getValueExpression(FaceletContext, Class), VariableMapper, jakarta.faces.view.facelets.FaceletHandler#apply(jakarta.faces.view.facelets.FaceletContext, jakarta.faces.component.UIComponent)
applyback to summary
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException

Implements com.sun.faces.facelets.TemplateClient.apply.

Doc from com.sun.faces.facelets.TemplateClient.apply.

This contract is much like the normal FaceletHandler.apply method, but it takes in an optional String name which tells this instance what fragment/definition it's looking for. If you are a match, apply your logic to the passed UIComponent and return true, otherwise do nothing and return false.

Parameters
ctx:FaceletContext

the FaceletContext of your instance, not the templates'

parent:UIComponent

current UIComponent instance to be applied

name:String

the String name or null if the whole body should be included

Returns:boolean

true if this client matched/applied the definition for the passed name

Annotations
@Override
Exceptions
IOException:
when an I/O exception occurs