|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.DataSourceTag com.bea.wlw.netui.tags.html.Tree
public class Tree
Netui tag that renders a tree control represented by a set of
TreeNode
objects.
Attribute Descriptions | |||
---|---|---|---|
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
action | Yes | No | No |
Hyperlink to which expand/contract actions should be sent. | |||
imageHandleDownLast | No | No | No |
The image name for an open non-leaf node with no line below it. | |||
imageHandleDownMiddle | No | No | No |
The image name for an open non-leaf node with a line below it. | |||
imageHandleRightLast | No | No | No |
The image name for a closed non-leaf node with no line below it. | |||
imageHandleRightMiddle | No | No | No |
The image name for a closed non-leaf node with a line below it. | |||
imageLineLast | No | No | No |
The image name for a blank area of the tree. | |||
imageLineMiddle | No | No | No |
The image name for an area with a line through it. | |||
imageLineVertical | No | No | No |
The image name for an area with a line through it. | |||
imageRoot | No | No | No |
The name of the directory containing the images for our icons, relative to the page including this tag. | |||
style | No | No | No |
CSS style class to be applied to be applied to the entire rendered
output of the tree control. | |||
styleSelected | No | No | No |
CSS style class to be applied to the text of any element that
is currently selected. | |||
styleUnselected | No | No | No |
CSS style class to be applied to the text of any element
that is not currently selected. | |||
tree | Yes | No | Read/Write |
Attribute name in the session or expression under which the root TreeNode of the tree we are rendering is stored. |
Node
,
TreeNode Class
,
Serialized Formtree
attribute stores the tree in the Session object,
under the property "tree". The imageRoot
attribute points to fa older of images
relative to the
Page Flow directory.
<netui:tree tree="{session.tree}" imageRoot="treeImages" style="tree-control" action="treeState"> <netui:node label="Root Folder" expanded="true" action="treeState" target="contentFrame"> <netui:node label="I" expanded="false" action="treeState" target="contentFrame"> <netui:node label="A" expanded="false" action="treeState" target="contentFrame"> <netui:node label="1" action="treeState" target="contentFrame"/> <netui:node label="2" action="treeState" target="contentFrame"/> </netui:node> </netui:node> </netui:node> </netui:tree>
Node
tags.
This tag can automatically handle display icons for the tree nodes
through the imageRoot
attribute.
If you point the imageRoot
attribute at a folder containing
appropriately named image files, the correct
images will be used for any given state of the tree's nodes. The image names should be:
- handledownlast.gif
- handledownmiddle.gif
- handlerightlast.gif
- handledownmiddle.gif
- linelastnode.gif
- linemiddlenode.gif
- linevertical.gif
Field Summary | |
---|---|
protected String |
action
The hyperlink to be used for submitting requests to expand and contract tree nodes. |
protected String |
imageHandleDownLast
|
protected String |
imageHandleDownMiddle
|
protected String |
imageHandleRightLast
|
protected String |
imageHandleRightMiddle
|
protected String |
imageLineLast
|
protected String |
imageLineMiddle
|
protected String |
imageLineVertical
|
protected String |
imageRoot
The name of the directory containing the images for our icons, relative to the page including this tag. |
protected TreeNode |
rootNode
|
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 com.bea.wlw.netui.tags.AbstractBaseTag |
---|
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants |
---|
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
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 | |
---|---|
Tree()
|
Method Summary | |
---|---|
int |
doEndTag()
Render this Tree control. |
int |
doStartTag()
Prepare the Tree for rendering. |
String |
getAction()
Gets the action used for expanding and contracting tree nodes. |
String |
getImageHandleDownLast()
Gets the image name for an open non-leaf node with no line below it. |
String |
getImageHandleDownMiddle()
Gets the image name for an open non-leaf node with a line below it. |
String |
getImageHandleRightLast()
Gets the image name for a closed non-leaf node with no line below it. |
String |
getImageHandleRightMiddle()
Gets the image name for a closed non-leaf node with a line below it. |
String |
getImageLineLast()
Gets the image name for a blank area of the tree. |
String |
getImageLineMiddle()
Gets the image name for an area with a line through it. |
String |
getImageLineVertical()
Gets the image name for an area with a line through it. |
String |
getImageRoot()
Gets the name of the directory containing the images for our icons, relative to the page including this tag. |
TreeNode |
getRootNode()
Gets the root TreeNode of this tree. |
String |
getStyle()
Gets the CSS style class to be applied to the entire tree. |
String |
getStyleSelected()
Gets the CSS style class to be applied to the text
of selected nodes. |
String |
getStyleUnselected()
Gets the CSS style class to be applied to the text
of unselected nodes. |
String |
getTagName()
Return the name of the Tag. |
String |
getTree()
Gets the name of the attribute (in the session), or expression, under which the root TreeNode instance is stored. |
protected TreeNode |
getTreeRoot()
Return the TreeControl instance for the tree control that
we are rendering. |
protected void |
localRelease()
Release all state information set by this tag. |
protected void |
render(javax.servlet.jsp.JspWriter out,
TreeNode 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)
Sets the action used for expanding and contracting tree nodes. |
void |
setImageHandleDownLast(String imageHandleDownLast)
Sets the image name for an open non-leaf node with no line below it. |
void |
setImageHandleDownMiddle(String imageHandleDownMiddle)
Sets the image name for an open non-leaf node with a line below it. |
void |
setImageHandleRightLast(String imageHandleRightLast)
Sets the image name for a closed non-leaf node with no line below it. |
void |
setImageHandleRightMiddle(String imageHandleRightMiddle)
Sets the image name for a closed non-leaf node with a line below it. |
void |
setImageLineLast(String imageLineLast)
Sets the image name for a blank area of the tree. |
void |
setImageLineMiddle(String imageLineMiddle)
Sets the image name for an area with a line through it. |
void |
setImageLineVertical(String imageLineVertical)
Sets the image name for an area with a line through it. |
void |
setImageRoot(String imageRoot)
Sets the name of the directory containing the images for our icons, relative to the page including this tag. |
void |
setRootNode(TreeNode rootNode)
Sets the root TreeNode of this tree. |
void |
setStyle(String style)
Sets the CSS style class to be applied to the entire tree. |
void |
setStyleSelected(String styleSelected)
Sets the CSS style class to be applied to the text
of selected nodes. |
void |
setStyleUnselected(String styleUnselected)
Sets the CSS style class to be applied to the text
of unselected nodes. |
void |
setTree(String tree)
Sets the name of the attribute (in the session), or expression, under which the root TreeNode instance is stored. |
Methods inherited from class com.bea.wlw.netui.tags.DataSourceTag |
---|
addNamingInterceptor, doNaming, evaluateDataSource, getDataSource, qualifyAttribute, removeNamingInterceptor, setDataSource |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setParent |
Field Detail |
---|
protected String imageHandleDownLast
protected String imageHandleDownMiddle
protected String imageHandleRightLast
protected String imageHandleRightMiddle
protected String imageLineLast
protected String imageLineMiddle
protected String imageLineVertical
protected String action
${name}
" will
be replaced by the name
property of the current
tree node.
protected String imageRoot
protected TreeNode rootNode
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 Tree()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public String getAction()
public void setAction(String action)
action
- - the actionpublic String getImageHandleDownLast()
public void setImageHandleDownLast(String imageHandleDownLast)
imageHandleDownLast
- - the image name (including extension)public String getImageHandleDownMiddle()
public void setImageHandleDownMiddle(String imageHandleDownMiddle)
imageHandleDownMiddle
- - the image name (including extension)public String getImageHandleRightLast()
public void setImageHandleRightLast(String imageHandleRightLast)
imageHandleRightLast
- - the image name (including extension)public String getImageHandleRightMiddle()
public void setImageHandleRightMiddle(String imageHandleRightMiddle)
imageHandleRightMiddle
- - the image name (including extension)public String getImageLineLast()
public void setImageLineLast(String imageLineLast)
imageLineLast
- - the image name (including extension)public String getImageLineMiddle()
public void setImageLineMiddle(String imageLineMiddle)
imageLineMiddle
- - the image name (including extension)public String getImageLineVertical()
public void setImageLineVertical(String imageLineVertical)
imageLineVertical
- - the image name (including extension)public String getImageRoot()
public void setImageRoot(String imageRoot)
imageRoot
- - the directory namepublic TreeNode getRootNode()
TreeNode
of this tree.
public void setRootNode(TreeNode rootNode)
TreeNode
of this tree.
rootNode
- - the root treeNodeTreeNode
of this tree.public String getStyle()
class
to be applied to the entire tree.
public void setStyle(String style)
class
to be applied to the entire tree.
style
- - the stylepublic String getStyleSelected()
class
to be applied to the text
of selected nodes.
public void setStyleSelected(String styleSelected)
class
to be applied to the text
of selected nodes.
styleSelected
- - the selected stylepublic String getStyleUnselected()
class
to be applied to the text
of unselected nodes.
public void setStyleUnselected(String styleUnselected)
class
to be applied to the text
of unselected nodes.
styleUnselected
- - the unselected stylepublic String getTree()
TreeNode
instance is stored.
public void setTree(String tree)
TreeNode
instance is stored.
tree
- - the tree attribute nameTreeNode
is stored.
This attribute may take a literal or a data binding expression.public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a processing error occursprotected void localRelease()
localRelease
in class DataSourceTag
protected TreeNode getTreeRoot() throws javax.servlet.jsp.JspException
TreeControl
instance for the tree control that
we are rendering.
javax.servlet.jsp.JspException
- if no TreeControl instance can be foundprotected void render(javax.servlet.jsp.JspWriter out, TreeNode 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
|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |