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>_componentHandlersprotected ArrayList<FaceletHandler>_facetHandlersprotected Map<String,FaceletHandler>_facetHandlersMapstatic StringCREATE_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 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.protected voidapplyCompositeComponentFacelet(FaceletContext faceletContext, UIComponent compositeComponentBase)protected voidapplyFinalInitializationSteps(FaceletContext ctx, FaceletCompositionContext mctx, UIComponent c)voidapplyNextHandler(FaceletContext ctx, UIComponent c)protected voidapplyNextHandlerIfNotApplied(FaceletContext ctx, UIComponent c)protected voidapplyNextHandlerIfNotAppliedDynamically(FaceletContext ctx, UIComponent c)UIComponentcreateComponent(FaceletContext ctx)protected MetaRulesetcreateMetaRuleset(Class<?> type, BeanInfo beanInfo)voidsetAttributes(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:
createComponentin interfaceComponentBuilderHandler- Overrides:
createComponentin classComponentHandler
-
applyNextHandler
public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException
- Overrides:
applyNextHandlerin 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:
setAttributesin 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: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:
IOExceptionFacesExceptionFaceletExceptionjakarta.el.ELException
-
applyNextHandlerIfNotAppliedDynamically
protected void applyNextHandlerIfNotAppliedDynamically(FaceletContext ctx, UIComponent c) throws IOException
- Throws:
IOException
-
-