|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSimpleTagSupport
AbstractSimpleTag
Tree
public class Tree
Netui tag that renders a tree control represented by a set of
TreeElement
objects.
tree
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>
Field Summary |
---|
Fields inherited from interface 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 |
Constructor Summary | |
---|---|
Tree()
|
Method Summary | |
---|---|
void |
collectChildError(String error)
This method will report all collected errors. |
void |
doTag()
Prepare the Tree for rendering. |
TreeElement |
getRootNode()
|
String |
getSelectionAction()
Return the action for selection events on the tree. |
String |
getTagName()
Return the name of the Tag. |
protected TreeElement |
getTreeRoot(ExpressionHandling expr)
Return the TreeControl instance for the tree control that
we are rendering. |
protected void |
render(StringBuilder sb,
HttpServletRequest request,
HttpServletResponse response,
TreeElement node,
int level,
AttributeRenderer attrs,
InheritableState state)
This is a recursive method which generates the markup for the tree. |
protected String |
renderTagId(String tagId,
AbstractHtmlState state)
This method will handle creating the tagId attribute. |
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 |
setDataSource(String dataSource)
Sets an expression which indentifies the TreeElement that represents the root of the tree. |
void |
setDefaultIcon(String defaultIcon)
Sets the default icon for TreeElements for a blank area of the tree. |
void |
setDisableClass(String disableClass)
Set the style class of a tree element when is is disabled. |
void |
setDisabledStyle(String disabledStyle)
Set the style of a tree element when is is disabled. |
void |
setExpansionAction(String action)
Sets the action used for expanding and contracting tree nodes. |
void |
setExpansionTarget(String target)
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(TreeElement rootNode)
Sets the root TreeElement of this tree. |
void |
setRunAtClient(boolean runAtClient)
|
void |
setSelectionAction(String action)
Sets the action used for expanding and contracting tree nodes. |
void |
setSelectionClass(String selectionClass)
Set the style class of a tree element when is is selected. |
void |
setSelectionStyle(String selectionStyle)
Set the style of a tree element when is is selected. |
void |
setTagId(String tagId)
Set the ID of the tag. |
void |
setTreeClass(String treeClass)
Sets the class attribute of the tree. |
void |
setTreeStyle(String treeStyle)
Sets the style attribute of the tree. |
void |
setUnselectClass(String unselectClass)
Set the style class of a tree element when is is selected. |
void |
setUnselectStyle(String unselectStyle)
Set the style class of a tree element when is is not selected. |
Methods inherited from class AbstractSimpleTag |
---|
addTagIdMapping, getBufferBody, getInlineError, getPageContext, getScriptReporter, getUserLocale, hasErrors, registerTagError, registerTagError, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class SimpleTagSupport |
---|
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Tree()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class AbstractSimpleTag
public void setExpansionAction(String action) throws JspException
action
- - the action
JspException
public void setSelectionAction(String action) throws JspException
action
- - the action
JspException
public String getSelectionAction()
public void setExpansionTarget(String target)
target
- - the target for expansionpublic void setTagId(String tagId) throws JspException
tagId
- - the tagId.
JspException
public void setImageHandleDownLast(String imageHandleDownLast)
imageHandleDownLast
- - the image name (including extension)public void setImageHandleDownMiddle(String imageHandleDownMiddle)
imageHandleDownMiddle
- - the image name (including extension)public void setImageHandleRightLast(String imageHandleRightLast)
imageHandleRightLast
- - the image name (including extension)public void setImageHandleRightMiddle(String imageHandleRightMiddle)
imageHandleRightMiddle
- - the image name (including extension)public void setImageLineLast(String imageLineLast)
imageLineLast
- - the image name (including extension)public void setDefaultIcon(String defaultIcon)
defaultIcon
- - the image name of the defaultIconpublic void setImageLineMiddle(String imageLineMiddle)
imageLineMiddle
- - the image name (including extension)public void setImageLineVertical(String imageLineVertical)
imageLineVertical
- - the image name (including extension)public void setImageRoot(String imageRoot)
imageRoot
- - the directory namepublic void setRunAtClient(boolean runAtClient)
runAtClient
- public void setRootNode(TreeElement rootNode)
TreeElement
of this tree.
rootNode
- - the root treeNodepublic TreeElement getRootNode()
public void setSelectionStyle(String selectionStyle)
style
attribute being generated for this tree node.
selectionStyle
- public void setDisableClass(String disableClass)
disableClass
- public void setDisabledStyle(String disabledStyle)
disabledStyle
- public void setSelectionClass(String selectionClass)
class
attribute being generated for this tree node.
selectionClass
- public void setUnselectStyle(String unselectStyle)
style
attribute being generated for this tree node.
unselectStyle
- public void setUnselectClass(String unselectClass)
class
attribute being generated for this tree node.
unselectClass
- public void setTreeStyle(String treeStyle)
style
attribute of the tree.
treeStyle
- - the stylepublic void setTreeClass(String treeClass)
class
attribute of the tree.
treeClass
- - the stylepublic void setDataSource(String dataSource)
dataSource
- - the tree attribute namepublic void doTag() throws JspException, IOException
doTag
in interface SimpleTag
doTag
in class SimpleTagSupport
JspException
- if a JSP exception has occurred
IOException
protected TreeElement getTreeRoot(ExpressionHandling expr) throws JspException
TreeControl
instance for the tree control that
we are rendering.
JspException
- if no TreeControl instance can be foundprotected void render(StringBuilder sb, HttpServletRequest request, HttpServletResponse response, TreeElement node, int level, AttributeRenderer attrs, InheritableState state) throws JspException
sb
- request
- response
- node
- level
- attrs
- state
-
JspException
protected String replace(String template, String placeholder, String value)
template
- Pattern string possibly containing the placeholderplaceholder
- Placeholder expression to be replacedvalue
- Replacement value for the placeholderprotected final String renderTagId(String tagId, AbstractHtmlState state)
tagid
out as the id
attribute of the HTML tag being generated.
tagId
- state
-
public void collectChildError(String error)
collectChildError
in interface IErrorCollector
error
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |