Class CompositionHandler
- java.lang.Object
-
- javax.faces.view.facelets.TagHandler
-
- org.apache.myfaces.view.facelets.tag.ui.CompositionHandler
-
- All Implemented Interfaces:
FaceletHandler,TemplateClient
@JSFFaceletTag(name="ui:composition") public final class CompositionHandler extends TagHandler implements TemplateClient
- Version:
- $Id$
- Author:
- Jacob Hookom
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,DefineHandler>_handlersprotected ParamHandler[]_paramsprotected TagAttribute_templateThe resolvable URI of the template to use.static StringNAME-
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
-
-
Constructor Summary
Constructors Constructor Description CompositionHandler(TagConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(FaceletContext ctx, UIComponent parent)booleanapply(FaceletContext ctx, UIComponent parent, String 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.-
Methods inherited from class javax.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
_template
@JSFFaceletAttribute(name="template", className="javax.el.ValueExpression", deferredValueType="java.lang.String") protected final TagAttribute _templateThe resolvable URI of the template to use. The content within the composition tag will be used in populating the template specified.
-
_handlers
protected final Map<String,DefineHandler> _handlers
-
_params
protected final ParamHandler[] _params
-
-
Constructor Detail
-
CompositionHandler
public CompositionHandler(TagConfig config)
-
-
Method Detail
-
apply
public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException, javax.el.ELException
- Specified by:
applyin interfaceFaceletHandler- Throws:
IOExceptionFacesExceptionFaceletExceptionjavax.el.ELException
-
apply
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException, FaceletException, javax.el.ELException
Description copied from interface:TemplateClientThis 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.- Specified by:
applyin interfaceTemplateClient- Parameters:
ctx- the FaceletContext of your instance, not the templates'parent- current UIComponent instance to be appliedname- the String name or null if the whole body should be included- Returns:
- true if this client matched/applied the definition for the passed name
- Throws:
IOExceptionFacesExceptionFaceletExceptionjavax.el.ELException
-
-