Class CompositeComponentResourceTagHandler
- java.lang.Object
-
- jakarta.faces.view.facelets.TagHandler
-
- jakarta.faces.view.facelets.MetaTagHandler
-
- jakarta.faces.view.facelets.DelegatingMetaTagHandler
-
- jakarta.faces.view.facelets.ComponentHandler
-
- 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$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayList<FaceletHandler>
_componentHandlers
protected ArrayList<FaceletHandler>
_facetHandlers
protected Map<String,FaceletHandler>
_facetHandlersMap
static String
CREATE_CC_ON_POST_ADD_TO_VIEW
-
Fields inherited from class jakarta.faces.view.facelets.DelegatingMetaTagHandler
delegateFactory
-
Fields inherited from class jakarta.faces.view.facelets.TagHandler
nextHandler, tag, tagId
-
-
Constructor Summary
Constructors Constructor Description CompositeComponentResourceTagHandler(ComponentConfig config, Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
protected void
applyFinalInitializationSteps(FaceletContext ctx, FaceletCompositionContext mctx, UIComponent c)
void
applyNextHandler(FaceletContext ctx, UIComponent c)
protected void
applyNextHandlerIfNotApplied(FaceletContext ctx, UIComponent c)
protected void
applyNextHandlerIfNotAppliedDynamically(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 jakarta.faces.view.facelets.ComponentHandler
getComponentConfig, getTagHandlerDelegate, isNew, onComponentCreated, onComponentPopulated
-
Methods inherited from class jakarta.faces.view.facelets.DelegatingMetaTagHandler
apply, createMetaRuleset, getBinding, getTag, getTagAttribute, getTagId, isDisabled
-
Methods inherited from class jakarta.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
-
-
-
Field Detail
-
CREATE_CC_ON_POST_ADD_TO_VIEW
public static final String CREATE_CC_ON_POST_ADD_TO_VIEW
- See Also:
- Constant Field Values
-
_facetHandlersMap
protected volatile Map<String,FaceletHandler> _facetHandlersMap
-
_componentHandlers
protected final ArrayList<FaceletHandler> _componentHandlers
-
_facetHandlers
protected final ArrayList<FaceletHandler> _facetHandlers
-
-
Constructor Detail
-
CompositeComponentResourceTagHandler
public CompositeComponentResourceTagHandler(ComponentConfig config, Resource resource)
-
-
Method Detail
-
createComponent
public UIComponent createComponent(FaceletContext ctx)
- Specified by:
createComponent
in interfaceComponentBuilderHandler
- Overrides:
createComponent
in classComponentHandler
-
applyNextHandler
public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException
- Overrides:
applyNextHandler
in classDelegatingMetaTagHandler
- Throws:
IOException
-
applyFinalInitializationSteps
protected void applyFinalInitializationSteps(FaceletContext ctx, FaceletCompositionContext mctx, UIComponent c)
-
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 classDelegatingMetaTagHandler
-
createMetaRuleset
protected MetaRuleset createMetaRuleset(Class<?> type, BeanInfo beanInfo)
-
apply
public boolean apply(FaceletContext ctx, UIComponent parent, String name) throws IOException, FacesException, FaceletException, jakarta.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 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:
IOException
FacesException
FaceletException
jakarta.el.ELException
-
applyNextHandlerIfNotAppliedDynamically
protected void applyNextHandlerIfNotAppliedDynamically(FaceletContext ctx, UIComponent c) throws IOException
- Throws:
IOException
-
-