org.apache.myfaces.view.facelets.tag.ui
Class CompositionHandler
java.lang.Object
javax.faces.view.facelets.TagHandler
org.apache.myfaces.view.facelets.tag.ui.CompositionHandler
- All Implemented Interfaces:
- javax.faces.view.facelets.FaceletHandler, TemplateClient
@JSFFaceletTag(name="ui:composition")
public final class CompositionHandler
- extends javax.faces.view.facelets.TagHandler
- implements TemplateClient
TODO: REFACTOR - This class could easily use a common parent with DecoratorHandler
- Version:
- $Id: CompositionHandler.java,v 1.14 2008/07/13 19:01:42 rlubke Exp $
- Author:
- Jacob Hookom
Fields inherited from class javax.faces.view.facelets.TagHandler |
nextHandler, tag, tagId |
Method Summary |
void |
apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent)
|
boolean |
apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
java.lang.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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Name
public static final java.lang.String Name
- See Also:
- Constant Field Values
_template
@JSFFaceletAttribute(name="template",
className="javax.el.ValueExpression",
deferredValueType="java.lang.String")
protected final javax.faces.view.facelets.TagAttribute _template
- The resolvable URI of the template to use. The content within the composition tag will
be used in populating the template specified.
_handlers
protected final java.util.Map<java.lang.String,DefineHandler> _handlers
_params
protected final ParamHandler[] _params
CompositionHandler
public CompositionHandler(javax.faces.view.facelets.TagConfig config)
- Parameters:
config
-
apply
public void apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent)
throws java.io.IOException,
javax.faces.FacesException,
javax.faces.view.facelets.FaceletException,
javax.el.ELException
- Specified by:
apply
in interface javax.faces.view.facelets.FaceletHandler
- Throws:
java.io.IOException
javax.faces.FacesException
javax.faces.view.facelets.FaceletException
javax.el.ELException
apply
public boolean apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
java.lang.String name)
throws java.io.IOException,
javax.faces.FacesException,
javax.faces.view.facelets.FaceletException,
javax.el.ELException
- Description copied from interface:
TemplateClient
- 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.
- Specified by:
apply
in interface TemplateClient
- 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:
java.io.IOException
javax.faces.FacesException
javax.faces.view.facelets.FaceletException
javax.el.ELException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.