Top Description Methods
com.sun.faces.facelets

public Interface TemplateClient

Known Direct Implementers
com.sun.faces.facelets.impl.DefaultFaceletContext.TemplateManager, com.sun.faces.facelets.tag.UserTagHandler, com.sun.faces.facelets.tag.ui.CompositionHandler, com.sun.faces.facelets.tag.ui.DecorateHandler, com.sun.faces.facelets.tag.ui.InsertHandler
Imports
javax.faces.component.UIComponent, javax.faces.view.facelets.FaceletContext, java.io.IOException

FaceletHandlers can implement this contract and push themselves into the FaceletContext for participating in templating. Templates will attempt to resolve content for a specified name until one of the TemplatClients return 'true'.
Author
Jacob Hookom

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this client matched/applied the definition for the passed name
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
)

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.

Method Detail

applyback to summary
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException

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