Package com.sun.faces.facelets.tag.jsf
Class CompositeComponentTagHandler
java.lang.Object
jakarta.faces.view.facelets.TagHandler
jakarta.faces.view.facelets.MetaTagHandler
jakarta.faces.view.facelets.DelegatingMetaTagHandler
jakarta.faces.view.facelets.ComponentHandler
com.sun.faces.facelets.tag.jsf.CompositeComponentTagHandler
- All Implemented Interfaces:
FaceletHandler
public class CompositeComponentTagHandler extends ComponentHandler
Facelet handler responsible for, building the component tree representation of a composite component based on the metadata contained in the composite interface and implementation sections of the composite component template.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CompositeComponentTagHandler(Resource ccResource, ComponentConfig config)
-
Method Summary
Modifier and Type Method Description void
applyNextHandler(FaceletContext ctx, UIComponent c)
Invoke theapply()
method on this instance'sTagHandler.nextHandler
.UIComponent
createComponent(FaceletContext ctx)
Subclasses that wish to take over the task of instantiating theUIComponent
instance corresponding to this tag handler my override this method to do so.protected MetaRuleset
createMetaRuleset(Class type)
This is basically a copy of what's define in ComponentTagHandlerDelegateImpl except for the MetaRuleset implementation that's being used.static List<AttachedObjectHandler>
getAttachedObjectHandlers(UIComponent component)
static List<AttachedObjectHandler>
getAttachedObjectHandlers(UIComponent component, boolean create)
UIComponent
getCompositeComponent(FacesContext context)
void
setAttributes(FaceletContext ctx, Object instance)
Specialized implementation to prevent caching of the MetaRuleset when ProjectStage is Development.void
setCompositeComponent(FacesContext context, UIComponent cc)
Methods inherited from class jakarta.faces.view.facelets.ComponentHandler
getComponentConfig, getTagHandlerDelegate, isNew, onComponentCreated, onComponentPopulated
Methods inherited from class jakarta.faces.view.facelets.DelegatingMetaTagHandler
apply, getBinding, getTag, getTagAttribute, getTagId, isDisabled
Methods inherited from class jakarta.faces.view.facelets.TagHandler
getAttribute, getRequiredAttribute, toString
-
Constructor Details
-
Method Details
-
createComponent
Description copied from class:ComponentHandler
Subclasses that wish to take over the task of instantiating the
UIComponent
instance corresponding to this tag handler my override this method to do so. Anull
return from this method will cause theTagHandlerDelegate
for instance to create the component instead.- Overrides:
createComponent
in classComponentHandler
- Parameters:
ctx
- theFaceletContext
for this view execution- Returns:
- the newly created
UIComponent
-
applyNextHandler
public void applyNextHandler(FaceletContext ctx, UIComponent c) throws IOException, FacesException, jakarta.el.ELExceptionDescription copied from class:DelegatingMetaTagHandler
Invoke the
apply()
method on this instance'sTagHandler.nextHandler
.- Overrides:
applyNextHandler
in classDelegatingMetaTagHandler
- Parameters:
ctx
- theFaceletContext
for this view executionc
- theUIComponent
of the component represented by this element instance.- Throws:
IOException
- if thrown by the nextFaceletHandler
FaceletException
- if thrown by the nextFaceletHandler
FacesException
- if thrown by the nextFaceletHandler
jakarta.el.ELException
- if thrown by the nextFaceletHandler
-
setCompositeComponent
-
getCompositeComponent
-
setAttributes
Specialized implementation to prevent caching of the MetaRuleset when ProjectStage is Development.- Overrides:
setAttributes
in classDelegatingMetaTagHandler
- Parameters:
ctx
- the Facelet context.instance
- the instance.
-
createMetaRuleset
This is basically a copy of what's define in ComponentTagHandlerDelegateImpl except for the MetaRuleset implementation that's being used. This also allows us to treat composite component's backed by custom component implementation classes based on their type.- Overrides:
createMetaRuleset
in classDelegatingMetaTagHandler
- Parameters:
type
- theClass
for which theMetaRuleset
must be created.- Returns:
-
getAttachedObjectHandlers
-
getAttachedObjectHandlers
public static List<AttachedObjectHandler> getAttachedObjectHandlers(UIComponent component, boolean create)
-