public class CompositeComponentStackManager extends Object
CompositeComponentStackManager
is responsible for managing the
two different composite component stacks currently used by Mojarra.
The stacks are identified by the CompositeComponentStackManager.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 Class Summary
Nested Classes
Modifier and Type
Class and Description
static class
CompositeComponentStackManager.StackType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
UIComponent
findCompositeComponentUsingLocation(FacesContext ctx,
Location location)
static CompositeComponentStackManager
getManager(FacesContext ctx)
UIComponent
getParentCompositeComponent(CompositeComponentStackManager.StackType stackType,
FacesContext ctx,
UIComponent forComponent)
UIComponent
peek()
UIComponent
peek(CompositeComponentStackManager.StackType stackType)
void
pop()
Pops the top-level component from the Evaluation
stack.
void
pop(CompositeComponentStackManager.StackType stackType)
Pops the top-level component from the stack.
boolean
push()
Pushes a component derived by the push logic to the Evaluation
stack.
boolean
push(CompositeComponentStackManager.StackType stackType)
Pushes a component derived by the push logic to the specified stack.
boolean
push(UIComponent compositeComponent)
Pushes the specified composite component to the Evaluation
stack.
boolean
push(UIComponent compositeComponent,
CompositeComponentStackManager.StackType stackType)
Pushes the specified composite component to the desired StackType
stack.
-
-
Method Detail
-
getManager
public static CompositeComponentStackManager getManager(FacesContext ctx)
- Parameters:
ctx
- the FacesContext
for the current request
- Returns:
- the
CompositeComponentStackManager
for the current
request
-
push
public boolean push(UIComponent compositeComponent)
Pushes the specified composite component to the Evaluation
stack.
- Parameters:
compositeComponent
- the component to push
- Returns:
true
if the component was pushed, otherwise
returns false
-
push
public boolean push(UIComponent compositeComponent,
CompositeComponentStackManager.StackType stackType)
Pushes the specified composite component to the desired StackType
stack.
- Parameters:
compositeComponent
- the component to push
stackType
- the stack to push to the component to
- Returns:
true
if the component was pushed, otherwise
returns false
-
push
public boolean push()
Pushes a component derived by the push logic to the Evaluation
stack.
- Returns:
true
if the component was pushed, otherwise
returns false
-
push
public boolean push(CompositeComponentStackManager.StackType stackType)
Pushes a component derived by the push logic to the specified stack.
- Parameters:
stackType
- the stack to push to the component to
- Returns:
true
if the component was pushed, otherwise
returns false
-
pop
public void pop(CompositeComponentStackManager.StackType stackType)
Pops the top-level component from the stack.
- Parameters:
stackType
- the stack to pop the top level component from
-
pop
public void pop()
Pops the top-level component from the Evaluation
stack.
-
peek
public UIComponent peek()
- Returns:
- the top-level component from the
Evaluation
stack
without removing the element
-
peek
public UIComponent peek(CompositeComponentStackManager.StackType stackType)
- Parameters:
stackType
- the stack to push to the component to
- Returns:
- the top-level component from the specified stack
without removing the element
-
getParentCompositeComponent
public UIComponent getParentCompositeComponent(CompositeComponentStackManager.StackType stackType,
FacesContext ctx,
UIComponent forComponent)
-
findCompositeComponentUsingLocation
public UIComponent findCompositeComponentUsingLocation(FacesContext ctx,
Location location)
Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.