|
|||||||||
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.
dataSource
attribute
identifies the TreeElement
in the appropriate binding context; in this case,
the page flow context is used. The selectionAction
attribute
is required so there can be a postback to the tree. tagId
is
used to uniquely identify a tree on the page.
<netui:tree dataSource="pageflow.myTree" selectionAction="postback" tagId="myTree"> <netui:treeItem expanded="true" > <netui:treeLabel>Root Folder</netui:treeLabel> <netui:treeItem expanded="false"> <netui:treeLabel>I</netui:treeLabel> <netui:treeItem expanded="false"> <netui:treeLabel>A</netui:treeLabel> <netui:treeItem>1</netui:treeItem> <netui:treeItem>2</netui:treeItem> </netui:treeItem> </netui:treeItem> </netui:treeItem> </netui:tree>
Field Summary |
---|
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()
Return the root node of the tree. |
String |
getSelectionAction()
Return the action for selection action 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 String |
renderTagId(HttpServletRequest request,
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 |
setAttribute(String name,
String value,
String facet)
Set an attribute value on the implementing class. |
void |
setDataSource(String dataSource)
Sets an expression which indentifies the TreeElement that represents the root of the tree. |
void |
setDisabledStyle(String disabledStyle)
Set the style of a tree element when is is disabled. |
void |
setDisabledStyleClass(String disableStyleClass)
Set the style class of a tree element when is is disabled. |
void |
setEscapeForHtml(boolean htmlEscape)
This attribue will cause the content of labels to be escaped when the value if true. |
void |
setExpansionAction(String action)
Sets the action used for expanding and contracting tree nodes. |
void |
setIconRoot(String iconRoot)
This will set the location of the icon images. |
void |
setImageRoot(String imageRoot)
Sets the name of the directory containing the images. |
void |
setItemIcon(String itemIcon)
Sets the default icon for TreeElements for a blank area of the tree. |
void |
setLastLineJoinImage(String lastLineJoinImage)
Sets the image name for a blank area of the tree. |
void |
setLastNodeCollapsedImage(String lastNodeCollapsedImage)
Sets the image name for a closed non-leaf node with no line below it. |
void |
setLastNodeExpandedImage(String lastNodeExpandedImage)
Sets the image name for an open non-leaf node with no line below it. |
void |
setLineJoinImage(String lineJoinImage)
Sets the image name for an area with a line through it. |
void |
setNodeCollapsedImage(String nodeCollapsedImage)
Sets the image name for a closed non-leaf node with a line below it. |
void |
setNodeExpandedImage(String nodeExpandedImage)
Sets the image name for an open non-leaf node with a line below it. |
void |
setRenderTagIdLookup(boolean renderTagIdLookup)
This will cause the standard tagId to Id JavaScript to be output. |
void |
setRootNode(TreeElement rootNode)
Sets the root TreeElement of this tree. |
void |
setRootNodeCollapsedImage(String rootNodeCollapsedImage)
Sets the image that will be used for the root when it is Collapsed. |
void |
setRootNodeExpandedImage(String rootNodeExpandedImage)
Sets the image that will be used for the root when it is Expanded. |
void |
setRunAtClient(boolean runAtClient)
Cause expansion and contraction on the client. |
void |
setSelectedStyle(String selectedStyle)
Set the style of a tree element when is is selected. |
void |
setSelectedStyleClass(String selectedStyleClass)
Set the style class of a tree element when is is selected. |
void |
setSelectionAction(String action)
Sets the action used for selecting tree nodes. |
void |
setSelectionTarget(String target)
Sets the target for a selection action. |
void |
setTagId(String tagId)
Set the ID of the tag. |
void |
setTreeStyle(String treeStyle)
Sets the style attribute of the tree. |
void |
setTreeStyleClass(String treeStyleClass)
Sets the class attribute of the tree. |
void |
setUnselectedStyle(String unselectedStyle)
Set the style class of a tree element when is is not selected. |
void |
setUnselectedStyleClass(String unselectedStyleClass)
Set the style class of a tree element when is is selected. |
void |
setVerticalLineImage(String verticalLineImage)
Sets the image name for an area with a line through it. |
Methods inherited from class AbstractSimpleTag |
---|
getBufferBody, getHtmlTag, getIdForTagId, 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
TreeElements
inside the tree.
action
- - the action
JspException
public void setSelectionAction(String action) throws JspException
TreeElements
inside the tree.
action
- - the action
JspException
public String getSelectionAction()
public void setSelectionTarget(String target)
target
- - the target for selectionpublic void setTagId(String tagId) throws JspException
RenderTagIdLookup
is set to true
.
tagId
- - the tagId.
JspException
public void setLastNodeExpandedImage(String lastNodeExpandedImage)
lastNodeExpandedImage
- - the image name (including extension)public void setNodeExpandedImage(String nodeExpandedImage)
nodeExpandedImage
- - the image name (including extension)public void setLastNodeCollapsedImage(String lastNodeCollapsedImage)
lastNodeCollapsedImage
- - the image name (including extension)public void setNodeCollapsedImage(String nodeCollapsedImage)
nodeCollapsedImage
- - the image name (including extension)public void setLastLineJoinImage(String lastLineJoinImage)
lastLineJoinImage
- - the image name (including extension)public void setItemIcon(String itemIcon)
itemIcon
- - the image name of the itemIconpublic void setLineJoinImage(String lineJoinImage)
lineJoinImage
- - the image name (including extension)public void setVerticalLineImage(String verticalLineImage)
verticalLineImage
- - the image name (including extension)public void setImageRoot(String imageRoot)
iconRoot
is not set, then this will also specify where
the icons come are found.
imageRoot
- - the directory namepublic void setIconRoot(String iconRoot)
getImageRoot
location.
iconRoot
- - the directory name for the iconspublic void setRootNodeCollapsedImage(String rootNodeCollapsedImage)
rootNodeCollapsedImage
- - the image representing a root that is collapsed.public void setRootNodeExpandedImage(String rootNodeExpandedImage)
rootNodeExpandedImage
- - the image representing a root that is expanded.public void setRunAtClient(boolean runAtClient)
runAtClient
- public void setEscapeForHtml(boolean htmlEscape)
htmlEscape
- public void setRenderTagIdLookup(boolean renderTagIdLookup)
renderTagIdLookup
- public void setRootNode(TreeElement rootNode)
TreeElement
of this tree.
rootNode
- - the root treeNodepublic TreeElement getRootNode()
public void setSelectedStyle(String selectedStyle)
style
attribute being generated for this tree node.
selectedStyle
- public void setDisabledStyleClass(String disableStyleClass)
disableStyleClass
- public void setDisabledStyle(String disabledStyle)
disabledStyle
- public void setSelectedStyleClass(String selectedStyleClass)
class
attribute being generated for this tree node.
selectedStyleClass
- public void setUnselectedStyle(String unselectedStyle)
style
attribute being generated for this tree node.
unselectedStyle
- public void setUnselectedStyleClass(String unselectedStyleClass)
class
attribute being generated for this tree node.
unselectedStyleClass
- public void setTreeStyle(String treeStyle)
style
attribute of the tree.
treeStyle
- - the stylepublic void setTreeStyleClass(String treeStyleClass)
class
attribute of the tree. This will be set
on the containing <div> for the tree.
treeStyleClass
- - the stylepublic void setDataSource(String dataSource)
dataSource
- - the tree attribute namepublic void setAttribute(String name, String value, String facet) throws JspException
name
represents
the name of the attribute. The value
represents the value and may contains
an expression. The facet
is optional and may be used by complex types to
target the attribute to a sub part of the generated markup. This method may result in errors
being generated.
setAttribute
in interface IAttributeConsumer
name
- The name of the attribute. This value may not be null or the empty string.value
- The value of the attribute. This may contain an expression.facet
- The name of a facet to which the attribute will be applied. This is optional.
JspException
- A JspException may be thrown if there is an error setting the attribute.public 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 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(HttpServletRequest request, 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 |