Top Description Inners Fields Constructors Methods
com.sun.faces.component

public Class CompositeComponentStackManager

extends Object
Class Inheritance
Imports
java.util.Stack, jakarta.faces.application.Resource, jakarta.faces.component.UIComponent, jakarta.faces.context.FacesContext, jakarta.faces.view.Location

CompositeComponentStackManager is responsible for managing the two different composite component stacks currently used by Mojarra.

The stacks are identified by the StackType enum which has two elements, TreeCreation and Evaluation.

The TreeCreation stack represents the composite components that have been pushed by the TagHandlers responsible for building the tree.

The Evaluation stack is used by the EL in order to properly resolve nested composite component expressions.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private abstract class
private class
private static interface
public static enum
private class

Field Summary

Modifier and TypeField and Description
private static final String
private final CompositeComponentStackManager.StackHandler
private final CompositeComponentStackManager.StackHandler

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public UIComponent
public static CompositeComponentStackManager

Returns:

the CompositeComponentStackManager for the current request
getManager
(FacesContext
the FacesContext for the current request
ctx
)

public UIComponent
private CompositeComponentStackManager.StackHandler
public UIComponent

Returns:

the top-level component from the Evaluation stack without removing the element
peek
()

public UIComponent

Returns:

the top-level component from the specified stack without removing the element
peek
(CompositeComponentStackManager.StackType
the stack to push to the component to
stackType
)

public void
pop(CompositeComponentStackManager.StackType
the stack to pop the top level component from
stackType
)

Pops the top-level component from the stack.

public void
pop()

Pops the top-level component from the Evaluation stack.

public boolean

Returns:

true if the component was pushed, otherwise returns false
push
(UIComponent
the component to push
compositeComponent
)

Pushes the specified composite component to the Evaluation stack.

public boolean

Returns:

true if the component was pushed, otherwise returns false
push
(UIComponent
the component to push
compositeComponent
,
CompositeComponentStackManager.StackType
the stack to push to the component to
stackType
)

Pushes the specified composite component to the desired StackType stack.

public boolean

Returns:

true if the component was pushed, otherwise returns false
push
()

Pushes a component derived by the push logic to the Evaluation stack.

public boolean

Returns:

true if the component was pushed, otherwise returns false
push
(CompositeComponentStackManager.StackType
the stack to push to the component to
stackType
)

Pushes a component derived by the push logic to the specified stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MANAGER_KEYback to summary
private static final String MANAGER_KEY
runtimeback to summary
private final CompositeComponentStackManager.StackHandler runtime
treeCreationback to summary
private final CompositeComponentStackManager.StackHandler treeCreation

Constructor Detail

CompositeComponentStackManagerback to summary
private CompositeComponentStackManager()

Method Detail

findCompositeComponentUsingLocationback to summary
public UIComponent findCompositeComponentUsingLocation(FacesContext ctx, Location location)
getManagerback to summary
public static CompositeComponentStackManager getManager(FacesContext ctx)
Parameters
ctx:FacesContext

the FacesContext for the current request

Returns:CompositeComponentStackManager

the CompositeComponentStackManager for the current request

getParentCompositeComponentback to summary
public UIComponent getParentCompositeComponent(CompositeComponentStackManager.StackType stackType, FacesContext ctx, UIComponent forComponent)
getStackHandlerback to summary
private CompositeComponentStackManager.StackHandler getStackHandler(CompositeComponentStackManager.StackType type)
peekback to summary
public UIComponent peek()
Returns:UIComponent

the top-level component from the Evaluation stack without removing the element

peekback to summary
public UIComponent peek(CompositeComponentStackManager.StackType stackType)
Parameters
stackType:CompositeComponentStackManager.StackType

the stack to push to the component to

Returns:UIComponent

the top-level component from the specified stack without removing the element

popback to summary
public void pop(CompositeComponentStackManager.StackType stackType)

Pops the top-level component from the stack.

Parameters
stackType:CompositeComponentStackManager.StackType

the stack to pop the top level component from

popback to summary
public void pop()

Pops the top-level component from the Evaluation stack.

pushback to summary
public boolean push(UIComponent compositeComponent)

Pushes the specified composite component to the Evaluation stack.

Parameters
compositeComponent:UIComponent

the component to push

Returns:boolean

true if the component was pushed, otherwise returns false

pushback to summary
public boolean push(UIComponent compositeComponent, CompositeComponentStackManager.StackType stackType)

Pushes the specified composite component to the desired StackType stack.

Parameters
compositeComponent:UIComponent

the component to push

stackType:CompositeComponentStackManager.StackType

the stack to push to the component to

Returns:boolean

true if the component was pushed, otherwise returns false

pushback to summary
public boolean push()

Pushes a component derived by the push logic to the Evaluation stack.

Returns:boolean

true if the component was pushed, otherwise returns false

pushback to summary
public boolean push(CompositeComponentStackManager.StackType stackType)

Pushes a component derived by the push logic to the specified stack.

Parameters
stackType:CompositeComponentStackManager.StackType

the stack to push to the component to

Returns:boolean

true if the component was pushed, otherwise returns false

com.sun.faces.component back to summary

private abstract Class CompositeComponentStackManager.BaseStackHandler

extends Object
implements StackHandler
Class Inheritance
  • java.lang.Object
  • com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler
All Implemented Interfaces
com.sun.faces.component.CompositeComponentStackManager.StackHandler
Known Direct Subclasses
com.sun.faces.component.CompositeComponentStackManager.RuntimeStackHandler, com.sun.faces.component.CompositeComponentStackManager.TreeCreationStackHandler

Field Summary

Modifier and TypeField and Description
protected Stack<UIComponent>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public Stack<UIComponent>
public UIComponent
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

stackback to summary
protected Stack<UIComponent> stack

Constructor Detail

BaseStackHandlerback to summary
private BaseStackHandler()

Method Detail

deleteback to summary
public void delete()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.delete.

Annotations
@Override
getStackback to summary
public Stack<UIComponent> getStack(boolean create)

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.getStack.

Annotations
@Override
peekback to summary
public UIComponent peek()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.peek.

Annotations
@Override
com.sun.faces.component back to summary

private final Class CompositeComponentStackManager.RuntimeStackHandler

extends BaseStackHandler
Class Inheritance

Field Summary

Inherited from com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler:
stack

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
private UIComponent
public UIComponent
public void
public boolean
public boolean
Inherited from com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler:
getStackpeek

Constructor Detail

RuntimeStackHandlerback to summary
private RuntimeStackHandler()

Method Detail

deleteback to summary
public void delete()

Overrides com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler.delete.

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.delete.

Annotations
@Override
getCompositeParentback to summary
private UIComponent getCompositeParent(UIComponent comp)
getParentCompositeComponentback to summary
public UIComponent getParentCompositeComponent(FacesContext ctx, UIComponent forComponent)

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.getParentCompositeComponent.

Annotations
@Override
popback to summary
public void pop()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.pop.

Annotations
@Override
pushback to summary
public boolean push()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.push.

Annotations
@Override
pushback to summary
public boolean push(UIComponent compositeComponent)

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.push.

Annotations
@Override
com.sun.faces.component back to summary

private Interface CompositeComponentStackManager.StackHandler

Known Direct Implementers
com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler

Method Summary

Modifier and TypeMethod and Description
public void
public UIComponent
public Stack<UIComponent>
getStack(boolean create)

public UIComponent
peek()

public void
pop()

public boolean
push(UIComponent compositeComponent)

public boolean
push()

Method Detail

deleteback to summary
public void delete()
getParentCompositeComponentback to summary
public UIComponent getParentCompositeComponent(FacesContext ctx, UIComponent forComponent)
getStackback to summary
public Stack<UIComponent> getStack(boolean create)
peekback to summary
public UIComponent peek()
popback to summary
public void pop()
pushback to summary
public boolean push(UIComponent compositeComponent)
pushback to summary
public boolean push()
com.sun.faces.component back to summary

public final Enum CompositeComponentStackManager.StackType

extends Enum<CompositeComponentStackManager.StackType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final CompositeComponentStackManager.StackType
public static final CompositeComponentStackManager.StackType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CompositeComponentStackManager.StackType
public static CompositeComponentStackManager.StackType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

Evaluationback to summary
public static final CompositeComponentStackManager.StackType Evaluation
TreeCreationback to summary
public static final CompositeComponentStackManager.StackType TreeCreation

Constructor Detail

StackTypeback to summary
private StackType()

Method Detail

valueOfback to summary
public static CompositeComponentStackManager.StackType valueOf(String name)
valuesback to summary
public static CompositeComponentStackManager.StackType[] values()
com.sun.faces.component back to summary

private final Class CompositeComponentStackManager.TreeCreationStackHandler

extends BaseStackHandler
Class Inheritance

Field Summary

Inherited from com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler:
stack

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public UIComponent
public void
public boolean
public boolean
Inherited from com.sun.faces.component.CompositeComponentStackManager.BaseStackHandler:
deletegetStackpeek

Constructor Detail

TreeCreationStackHandlerback to summary
private TreeCreationStackHandler()

Method Detail

getParentCompositeComponentback to summary
public UIComponent getParentCompositeComponent(FacesContext ctx, UIComponent forComponent)

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.getParentCompositeComponent.

Annotations
@Override
popback to summary
public void pop()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.pop.

Annotations
@Override
pushback to summary
public boolean push()

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.push.

Annotations
@Override
pushback to summary
public boolean push(UIComponent compositeComponent)

Implements com.sun.faces.component.CompositeComponentStackManager.StackHandler.push.

Annotations
@Override