|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport org.ow2.jonas.webapp.taglib.TreeControlTag
public class TreeControlTag
JSP custom tag that renders a tree control represented by the
TreeControl
and TreeControlNode
classes.
This tag has the following user-settable attributes:
${node}
marking where
the node name of the affected node should be included.tree
attribute is to be found (page, request, session, application). If
not specified, the attribute is searched for in all scopes.class
to be applied
to be applied to the entire rendered output of the tree control.
If not specified, no style class is applied.class
to be
applied to the text of any element that is currently selected. If not
specified, no additional style class is applied.class
to be
applied to the text of any element that is not currently selected.
If not specified, no additional style class is applied.TreeControl
bean of the tree we are rendering
is stored, in the scope specified by the scope
attribute. This attribute is required.
Field Summary | |
---|---|
protected String |
action
The hyperlink to be used for submitting requests to expand and contract tree nodes. |
protected String |
images
The name of the directory containing the images for our icons, relative to the page including this tag. |
protected String |
scope
The name of the scope in which to search for the tree
attribute. |
protected String |
style
The CSS style class to be applied to the entire tree. |
protected String |
styleSelected
The CSS style class to be applied to the text
of selected nodes. |
protected String |
styleUnselected
The CSS style class to be applied to the text
of unselected nodes. |
protected String |
tree
The name of the attribute (in the specified scope) under which our TreeControl instance is stored. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
TreeControlTag()
|
Method Summary | |
---|---|
int |
doEndTag()
Render this tree control. |
String |
getAction()
|
String |
getImages()
|
String |
getScope()
|
String |
getStyle()
|
String |
getStyleSelected()
|
String |
getStyleUnselected()
|
String |
getTree()
|
protected TreeControl |
getTreeControl()
Return the TreeControl instance for the tree control that
we are rendering. |
void |
release()
Release all state information set by this tag. |
protected void |
render(JspWriter out,
TreeControlNode node,
int level,
int width,
boolean last)
Render the specified node, as controlled by the specified parameters. |
protected String |
replace(String template,
String placeholder,
String value)
Replace any occurrence of the specified placeholder in the specified template string with the specified replacement value. |
void |
setAction(String action)
|
void |
setImages(String images)
|
void |
setScope(String scope)
|
void |
setStyle(String style)
|
void |
setStyleSelected(String styleSelected)
|
void |
setStyleUnselected(String styleUnselected)
|
void |
setTree(String tree)
|
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String action
${name}
" will
be replaced by the name
property of the current
tree node.
protected String images
protected String scope
tree
attribute. Must be "page", "request", "session", or "application"
(or null
for an ascending-visibility search).
protected String style
class
to be applied to the entire tree.
protected String styleSelected
class
to be applied to the text
of selected nodes.
protected String styleUnselected
class
to be applied to the text
of unselected nodes.
protected String tree
TreeControl
instance is stored.
Constructor Detail |
---|
public TreeControlTag()
Method Detail |
---|
public String getAction()
public void setAction(String action)
public String getImages()
public void setImages(String images)
public String getScope()
public void setScope(String scope)
public String getStyle()
public void setStyle(String style)
public String getStyleSelected()
public void setStyleSelected(String styleSelected)
public String getStyleUnselected()
public void setStyleUnselected(String styleUnselected)
public String getTree()
public void setTree(String tree)
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class TagSupport
JspException
- if a processing error occurspublic void release()
release
in interface Tag
release
in class TagSupport
protected TreeControl getTreeControl() throws JspException
TreeControl
instance for the tree control that
we are rendering.
JspException
- if no TreeControl instance can be foundprotected void render(JspWriter out, TreeControlNode node, int level, int width, boolean last) throws IOException
out
- The JspWriter
to which we are writingnode
- The TreeControlNode
we are currently
renderinglevel
- The indentation level of this node in the treewidth
- Total displayable width of the treelast
- Is this the last node in a list?
IOException
- if an input/output error occursprotected String replace(String template, String placeholder, String value)
template
- Pattern string possibly containing the placeholderplaceholder
- Placeholder expression to be replacedvalue
- Replacement value for the placeholder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |