Top Inners Fields Constructors Methods
com.sun.faces.facelets.tag.faces

public Class ComponentTagHandlerDelegateImpl

extends TagHandlerDelegate
Class Inheritance
Known Direct Subclasses
com.sun.faces.facelets.tag.faces.html.ComponentResourceDelegate
Static Imports
com.sun.faces.RIConstants.DYNAMIC_COMPONENT, com.sun.faces.component.CompositeComponentStackManager.StackType.TreeCreation

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private final TagAttribute
protected String
private ComponentTagHandlerDelegateImpl.CreateComponentDelegate
protected final TagAttribute
private static final Logger
private ComponentHandler
private final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
addComponentToView(FaceletContext ctx, UIComponent parent, UIComponent c, boolean componentFound, boolean parentModified)

protected void
addComponentToView(FaceletContext ctx, UIComponent parent, UIComponent c, boolean componentFound)

private void
public void
apply(FaceletContext
the FaceletContext for this request
ctx
,
UIComponent
the UIComponent that corresponds to this element.
parent
)

Implements abstract jakarta.faces.view.facelets.TagHandlerDelegate.apply.

Method handles UIComponent tree creation in accordance with the Faces 1.2 spec.

protected void
private UIComponent
createComponent(FaceletContext
FaceletContext to use in creating a component
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.

public MetaRuleset
createMetaRuleset(Class<T>
the Class for which the MetaRuleset must be created.
type
)

Implements abstract jakarta.faces.view.facelets.TagHandlerDelegate.createMetaRuleset.

Return a MetaRuleset particular to this kind of tag handler.

protected void
protected void
private void
doOrphanedChildCleanup(FaceletContext ctx, UIComponent parent, UIComponent c, boolean parentModified)

protected void
protected UIComponent
protected UIComponent
private String

Returns:

the Facet name we are scoped in, otherwise null
getFacetName
(UIComponent parent)

protected boolean
private boolean
protected void
popComponentFromEL(FaceletContext ctx, UIComponent c, CompositeComponentStackManager ccStackManager, boolean compCompPushed)

private void
private void
processValidators(FacesContext ctx, EditableValueHolder editableValueHolder)

Process default validatior/wrapping validation information and install Validators based off the result.

protected boolean
pack-priv void
private boolean

Field Detail

bindingback to summary
private final TagAttribute binding
componentTypeback to summary
protected String componentType
createCompositeComponentDelegateback to summary
private ComponentTagHandlerDelegateImpl.CreateComponentDelegate createCompositeComponentDelegate
idback to summary
protected final TagAttribute id
logback to summary
private static final Logger log
ownerback to summary
private ComponentHandler owner
rendererTypeback to summary
private final String rendererType

Constructor Detail

ComponentTagHandlerDelegateImplback to summary
public ComponentTagHandlerDelegateImpl(ComponentHandler owner)

Method Detail

addComponentToViewback to summary
private void addComponentToView(FaceletContext ctx, UIComponent parent, UIComponent c, boolean componentFound, boolean parentModified)
addComponentToViewback to summary
protected void addComponentToView(FaceletContext ctx, UIComponent parent, UIComponent c, boolean componentFound)
adjustIndexOfDynamicChildrenback to summary
private void adjustIndexOfDynamicChildren(FacesContext context, UIComponent parent)
applyback to summary
public void apply(FaceletContext ctx, UIComponent parent) throws IOException

Implements abstract jakarta.faces.view.facelets.TagHandlerDelegate.apply.

Method handles UIComponent tree creation in accordance with the Faces 1.2 spec.

  1. First determines this UIComponent's id by calling jakarta.faces.view.facelets.ComponentHandler#getTagId().
  2. Search the parent for an existing UIComponent of the id we just grabbed
  3. If found, mark its children for deletion.
  4. If not found, call createComponent.
    1. Only here do we apply com.sun.faces.facelets.tag.MetaTagHandlerImpl#setAttributes(FaceletContext, Object)
    2. Set the UIComponent's id
    3. Set the RendererType of this instance
  5. Now apply the nextHandler, passing the UIComponent we've created/found.
  6. Now add the UIComponent to the passed parent
  7. Lastly, if the UIComponent already existed (found), then finalize for deletion.
Parameters
ctx:FaceletContext

Doc from jakarta.faces.view.facelets.TagHandlerDelegate.apply.

the FaceletContext for this request

parent:UIComponent

Doc from jakarta.faces.view.facelets.TagHandlerDelegate.apply.

the UIComponent that corresponds to this element.

Annotations
@Override
Exceptions
IOException:

Doc from jakarta.faces.view.facelets.TagHandlerDelegate.apply.

if any files necessary to apply this tag handler have any difficulty while loading

TagException:
if the UIComponent parent is null
assignUniqueIdback to summary
protected void assignUniqueId(FaceletContext ctx, UIComponent parent, String id, UIComponent c)
createComponentback to summary
private 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.

Parameters
ctx:FaceletContext

FaceletContext to use in creating a component

See Also
Application#createComponent(jakarta.faces.el.ValueBinding, jakarta.faces.context.FacesContext, java.lang.String), Application#createComponent(java.lang.String)
createMetaRulesetback to summary
public MetaRuleset createMetaRuleset(Class<T> type)

Implements abstract jakarta.faces.view.facelets.TagHandlerDelegate.createMetaRuleset.

Doc from jakarta.faces.view.facelets.TagHandlerDelegate.createMetaRuleset.

Return a MetaRuleset particular to this kind of tag handler. Called from classes that implement MetaTagHandler.

Parameters
type:Class<T>

the Class for which the MetaRuleset must be created.

Returns:MetaRuleset

a MetaRuleset particular to this kind of tag handler.

Annotations
@Override
doExistingComponentActionsback to summary
protected void doExistingComponentActions(FaceletContext ctx, String id, UIComponent c)
doNewComponentActionsback to summary
protected void doNewComponentActions(FaceletContext ctx, String id, UIComponent c)
doOrphanedChildCleanupback to summary
private void doOrphanedChildCleanup(FaceletContext ctx, UIComponent parent, UIComponent c, boolean parentModified)
doOrphanedChildCleanupback to summary
protected void doOrphanedChildCleanup(FaceletContext ctx, UIComponent parent, UIComponent c)
findChildback to summary
protected UIComponent findChild(FaceletContext ctx, UIComponent parent, String tagId)
Annotations
@SuppressWarnings:UnusedDeclaration
findReparentedComponentback to summary
protected UIComponent findReparentedComponent(FaceletContext ctx, UIComponent parent, String tagId)
Annotations
@SuppressWarnings:UnusedDeclaration
getFacetNameback to summary
private String getFacetName(UIComponent parent)
Returns:String

the Facet name we are scoped in, otherwise null

isIteratingback to summary
protected boolean isIterating(FaceletContext context)
isParentChildrenModifiedback to summary
private boolean isParentChildrenModified(UIComponent parent)
popComponentFromELback to summary
protected void popComponentFromEL(FaceletContext ctx, UIComponent c, CompositeComponentStackManager ccStackManager, boolean compCompPushed)
privateOnComponentPopulatedback to summary
private void privateOnComponentPopulated(FaceletContext ctx, UIComponent c)
processValidatorsback to summary
private void processValidators(FacesContext ctx, EditableValueHolder editableValueHolder)

Process default validatior/wrapping validation information and install Validators based off the result.

pushComponentToELback to summary
protected boolean pushComponentToEL(FaceletContext ctx, UIComponent c, CompositeComponentStackManager ccStackManager)
setCreateCompositeComponentDelegateback to summary
pack-priv void setCreateCompositeComponentDelegate(ComponentTagHandlerDelegateImpl.CreateComponentDelegate createComponentDelegate)
suppressRemovedChildback to summary
private boolean suppressRemovedChild(UIComponent parent, String childTagId)
com.sun.faces.facelets.tag.faces back to summary

pack-priv Interface ComponentTagHandlerDelegateImpl.CreateComponentDelegate

Known Direct Implementers
com.sun.faces.facelets.tag.faces.CompositeComponentTagHandler

Method Summary

Modifier and TypeMethod and Description
public UIComponent
public UIComponent
public void

Method Detail

createComponentback to summary
public UIComponent createComponent(FaceletContext ctx)
getCompositeComponentback to summary
public UIComponent getCompositeComponent(FacesContext context)
setCompositeComponentback to summary
public void setCompositeComponent(FacesContext context, UIComponent cc)