Class ComponentTagHandlerDelegate
- java.lang.Object
- 
- jakarta.faces.view.facelets.TagHandlerDelegate
- 
- org.apache.myfaces.view.facelets.tag.faces.ComponentTagHandlerDelegate
 
 
- 
 public class ComponentTagHandlerDelegate extends TagHandlerDelegate Implementation of the tag logic used in the JSF specification. See org.apache.myfaces.view.facelets.tag.faces.ComponentHandler- Since:
- 2.0
- Version:
- $Revision$ $Date$
- Author:
- Leonardo Uribe (latest modification by $Author$)
 
- 
- 
Constructor SummaryConstructors Constructor Description ComponentTagHandlerDelegate(ComponentHandler delegate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(FaceletContext ctx, UIComponent parent)Method handles UIComponent tree creation in accordance with the JSF 1.2 spec.protected UIComponentcreateComponent(FaceletContext ctx)If the binding attribute was specified, use that in conjuction with our componentType String variable to call createComponent on the Application, otherwise just pass the componentType String.MetaRulesetcreateMetaRuleset(Class type)protected StringgetFacetName(FaceletContext ctx, UIComponent parent)Return the Facet name we are scoped in, otherwise nullprotected StringgetId(FaceletContext ctx)If the id TagAttribute was specified, get it's value, otherwise generate a unique id from our tagId.
 
- 
- 
- 
Constructor Detail- 
ComponentTagHandlerDelegatepublic ComponentTagHandlerDelegate(ComponentHandler delegate) 
 
- 
 - 
Method Detail- 
applypublic void apply(FaceletContext ctx, UIComponent parent) throws IOException Method handles UIComponent tree creation in accordance with the JSF 1.2 spec.- First determines this UIComponent's id by calling getId(FaceletContext).
- Search the parent for an existing UIComponent of the id we just grabbed
- If found, markits children for deletion.
- If not found, call createComponent.- Only here do we apply TagHandler#setAttributes(FaceletCompositionContext, Object)
- Set the UIComponent's id
- Set the RendererType of this instance
 
- Now apply the nextHandler, passing the UIComponent we've created/found.
- Now add the UIComponent to the passed parent
- Lastly, if the UIComponent already existed (found), then #finalizeForDeletion(FaceletCompositionContext, UIComponent) for deletion.
 - Specified by:
- applyin class- TagHandlerDelegate
- Throws:
- TagException- if the UIComponent parent is null
- IOException
 
- First determines this UIComponent's id by calling 
 - 
getFacetNameprotected final String getFacetName(FaceletContext ctx, UIComponent parent) Return the Facet name we are scoped in, otherwise null- Parameters:
- ctx-
- Returns:
 
 - 
createComponentprotected UIComponent createComponent(FaceletContext ctx) If the binding attribute was specified, use that in conjuction with our componentType String variable to call createComponent on the Application, otherwise just pass the componentType String.If the binding was used, then set the ValueExpression "binding" on the created UIComponent. See Application#createComponent(jakarta.faces.el.ValueBinding, jakarta.faces.context.FacesContext, java.lang.String) See Application#createComponent(java.lang.String)- Parameters:
- ctx- FaceletContext to use in creating a component
- Returns:
 
 - 
getIdprotected String getId(FaceletContext ctx) If the id TagAttribute was specified, get it's value, otherwise generate a unique id from our tagId. See TagAttribute#getValue(FaceletContext)- Parameters:
- ctx- FaceletContext to use
- Returns:
- what should be a unique Id
 
 - 
createMetaRulesetpublic MetaRuleset createMetaRuleset(Class type) - Specified by:
- createMetaRulesetin class- TagHandlerDelegate
 
 
- 
 
-