org.apache.myfaces.view.facelets.tag.composite
Class CompositeComponentResourceTagHandler

java.lang.Object
  extended by javax.faces.view.facelets.TagHandler
      extended by javax.faces.view.facelets.MetaTagHandler
          extended by javax.faces.view.facelets.DelegatingMetaTagHandler
              extended by javax.faces.view.facelets.ComponentHandler
                  extended by org.apache.myfaces.view.facelets.tag.composite.CompositeComponentResourceTagHandler
All Implemented Interfaces:
FaceletHandler, ComponentBuilderHandler, TemplateClient

public class CompositeComponentResourceTagHandler
extends ComponentHandler
implements ComponentBuilderHandler, TemplateClient

This handler is responsible for apply composite components. It is created by CompositeResourceLibrary class when a composite component is found.

Version:
$Revision: 1523353 $ $Date: 2013-09-14 18:28:45 -0500 (Sat, 14 Sep 2013) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Field Summary
protected  Collection<FaceletHandler> _componentHandlers
           
protected  Collection<FaceletHandler> _facetHandlers
           
protected  Map<String,FaceletHandler> _facetHandlersMap
           
 
Fields inherited from class javax.faces.view.facelets.DelegatingMetaTagHandler
delegateFactory
 
Fields inherited from class javax.faces.view.facelets.TagHandler
nextHandler, tag, tagId
 
Constructor Summary
CompositeComponentResourceTagHandler(ComponentConfig config, Resource resource)
           
 
Method Summary
 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.
protected  void applyCompositeComponentFacelet(FaceletContext faceletContext, UIComponent compositeComponentBase)
           
 void applyNextHandler(FaceletContext ctx, UIComponent c)
           
protected  void applyNextHandlerIfNotApplied(FaceletContext ctx, UIComponent c)
           
 UIComponent createComponent(FaceletContext ctx)
           
protected  MetaRuleset createMetaRuleset(Class<?> type, BeanInfo beanInfo)
           
 void setAttributes(FaceletContext ctx, Object instance)
           
 
Methods inherited from class javax.faces.view.facelets.ComponentHandler
getComponentConfig, getTagHandlerDelegate, isNew, onComponentCreated, onComponentPopulated
 
Methods inherited from class javax.faces.view.facelets.DelegatingMetaTagHandler
apply, createMetaRuleset, getBinding, getTag, getTagAttribute, getTagId, isDisabled
 
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

_facetHandlersMap

protected volatile Map<String,FaceletHandler> _facetHandlersMap

_componentHandlers

protected final Collection<FaceletHandler> _componentHandlers

_facetHandlers

protected final Collection<FaceletHandler> _facetHandlers
Constructor Detail

CompositeComponentResourceTagHandler

public CompositeComponentResourceTagHandler(ComponentConfig config,
                                            Resource resource)
Method Detail

createComponent

public UIComponent createComponent(FaceletContext ctx)
Specified by:
createComponent in interface ComponentBuilderHandler

applyNextHandler

public void applyNextHandler(FaceletContext ctx,
                             UIComponent c)
                      throws IOException
Overrides:
applyNextHandler in class DelegatingMetaTagHandler
Throws:
IOException

applyNextHandlerIfNotApplied

protected void applyNextHandlerIfNotApplied(FaceletContext ctx,
                                            UIComponent c)
                                     throws IOException
Throws:
IOException

applyCompositeComponentFacelet

protected void applyCompositeComponentFacelet(FaceletContext faceletContext,
                                              UIComponent compositeComponentBase)
                                       throws IOException
Throws:
IOException

setAttributes

public void setAttributes(FaceletContext ctx,
                          Object instance)
Overrides:
setAttributes in class DelegatingMetaTagHandler

createMetaRuleset

protected MetaRuleset createMetaRuleset(Class<?> type,
                                        BeanInfo beanInfo)

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.