org.apache.myfaces.view.facelets.tag.ui
Class LegacyCompositionHandler

java.lang.Object
  extended by javax.faces.view.facelets.TagHandler
      extended by org.apache.myfaces.view.facelets.tag.ui.LegacyCompositionHandler
All Implemented Interfaces:
FaceletHandler, TemplateClient

public final class LegacyCompositionHandler
extends TagHandler
implements TemplateClient

NOTE: This implementation is provided for compatibility reasons and it is considered faulty. It is enabled using org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY web config param. Don't use it if EL expression caching is enabled.

Version:
$Id: CompositionHandler.java,v 1.14 2008/07/13 19:01:42 rlubke Exp $
Author:
Jacob Hookom

Field Summary
protected  Map<String,DefineHandler> _handlers
           
protected  LegacyParamHandler[] _params
           
protected  TagAttribute _template
          The resolvable URI of the template to use.
static String NAME
           
 
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
LegacyCompositionHandler(TagConfig config)
           
 
Method Summary
 void apply(FaceletContext ctx, UIComponent parent)
           
 boolean apply(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

_template

protected final 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 Map<String,DefineHandler> _handlers

_params

protected final LegacyParamHandler[] _params
Constructor Detail

LegacyCompositionHandler

public LegacyCompositionHandler(TagConfig config)
Parameters:
config -
Method Detail

apply

public void apply(FaceletContext ctx,
                  UIComponent parent)
           throws IOException,
                  FacesException,
                  FaceletException,
                  javax.el.ELException
Specified by:
apply in interface FaceletHandler
Throws:
IOException
FacesException
FaceletException
javax.el.ELException

apply

public boolean apply(FaceletContext ctx,
                     UIComponent parent,
                     String name)
              throws IOException,
                     FacesException,
                     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 applied
name - 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:
IOException
FacesException
FaceletException
javax.el.ELException


Copyright © 2014 The Apache Software Foundation. All rights reserved.