public class LayoutRenderTagPath extends Object
LayoutRenderTag within a page. Within a single page, any number of
render tags can be accessible via the same "path," where a path consists of zero or more
component tags that are parents of the render tag. This class helps to distinguish between
multiple render tags with the same component path by assigning sequential indexes to them.| Constructor and Description |
|---|
LayoutRenderTagPath(LayoutRenderTag tag)
Construct a new instance to identify the specified tag.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
calculateComponentPath(LayoutRenderTag tag)
Calculate the path to a render tag.
|
boolean |
equals(Object obj) |
List<String> |
getComponentPath()
Get the names of the
LayoutComponentTags that are parent tags of the render tag. |
int |
getIndex()
Get the index (zero-based) of the combined render page and component path within the page.
|
int |
hashCode() |
protected int |
incrementIndex(PageContext pageContext)
Get the next index for this path from the specified page context.
|
boolean |
isPathComponent(LayoutComponentTag tag)
True if the specified tag is a component that must execute so that the current component tag
can execute.
|
protected boolean |
isPathComponent(LayoutComponentTag tag,
Iterator<String> path)
Recursive method called from
isPathComponent(LayoutComponentTag) that returns true
if the specified tag's name is present in the component path iterator at the same position
where this tag occurs in the render/component tag tree. |
String |
toString() |
String |
toStringWithoutIndex()
Get a string representation of this instance without including the index.
|
public LayoutRenderTagPath(LayoutRenderTag tag)
protected List<String> calculateComponentPath(LayoutRenderTag tag)
tag - The render tag.protected int incrementIndex(PageContext pageContext)
public List<String> getComponentPath()
LayoutComponentTags that are parent tags of the render tag.public int getIndex()
public boolean isPathComponent(LayoutComponentTag tag) throws StripesJspException
tag - The tag to check to see if it is part of this path.StripesJspExceptionprotected boolean isPathComponent(LayoutComponentTag tag, Iterator<String> path)
isPathComponent(LayoutComponentTag) that returns true
if the specified tag's name is present in the component path iterator at the same position
where this tag occurs in the render/component tag tree. For example, if the path iterator
contains the component names ["foo", "bar"] then this method will return true if the
tag's name is "bar" and it is a child of a render tag that is a child of a component
tag whose name is "foo".tag - The tag to checkpath - The path to the check the tag againstpublic String toStringWithoutIndex()
© Copyright 2005-2006, Stripes Development Team.