Package org.apache.wicket
Class DequeueContext
- java.lang.Object
-
- org.apache.wicket.DequeueContext
-
public final class DequeueContext extends Object
Context for component dequeueing. Keeps track of markup position and container stack.- Author:
- igor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DequeueContext.Bookmark
A bookmark for the DequeueContext stack
-
Constructor Summary
Constructors Constructor Description DequeueContext(IMarkupFragment markup, MarkupContainer root, boolean skipFirst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Component
findComponentToDequeue(ComponentTag tag)
Searches the container stack for a component that can be dequeudeboolean
isAtOpenOrOpenCloseTag()
Checks if the tag returned bypeekTag()
is either open or open-close.MarkupContainer
peekContainer()
Retrieves the container on the top of the containers stackComponentTag
peekTag()
Peeks markup tag that would be retrieved by call totakeTag()
MarkupContainer
popContainer()
Pops a container from the container stackvoid
pushContainer(MarkupContainer container)
Pushes a container onto the container stackvoid
restore(DequeueContext.Bookmark bookmark)
Restores the state of the context from the bookmarkDequeueContext.Bookmark
save()
Saves the state of the context into a bookmark which can later be used to restore it.void
skipToCloseTag()
Skips to the closing tag of the tag retrieved from last call totakeTag()
ComponentTag
takeTag()
Retrieves the next markup tag
-
-
-
Constructor Detail
-
DequeueContext
public DequeueContext(IMarkupFragment markup, MarkupContainer root, boolean skipFirst)
-
-
Method Detail
-
save
public DequeueContext.Bookmark save()
Saves the state of the context into a bookmark which can later be used to restore it.
-
restore
public void restore(DequeueContext.Bookmark bookmark)
Restores the state of the context from the bookmark- Parameters:
bookmark
-
-
peekTag
public ComponentTag peekTag()
Peeks markup tag that would be retrieved by call totakeTag()
- Returns:
-
takeTag
public ComponentTag takeTag()
Retrieves the next markup tag- Returns:
-
skipToCloseTag
public void skipToCloseTag()
Skips to the closing tag of the tag retrieved from last call totakeTag()
-
isAtOpenOrOpenCloseTag
public boolean isAtOpenOrOpenCloseTag()
Checks if the tag returned bypeekTag()
is either open or open-close.- Returns:
-
peekContainer
public MarkupContainer peekContainer()
Retrieves the container on the top of the containers stack- Returns:
-
pushContainer
public void pushContainer(MarkupContainer container)
Pushes a container onto the container stack- Parameters:
container
-
-
popContainer
public MarkupContainer popContainer()
Pops a container from the container stack- Returns:
-
findComponentToDequeue
public Component findComponentToDequeue(ComponentTag tag)
Searches the container stack for a component that can be dequeude- Parameters:
tag
-- Returns:
-
-