BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.html
Class Node

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.html.Node
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class Node
extends AbstractBaseTag

Instantiates a TreeNode object that will get added to the parent tag (either a Tree or another Node).

Attribute Descriptions
AttributeRequiredRuntime Expression Evaluation Data Bindable
actionNoNoNo
An action invoked by clicking the node.
expandedNoNoNo
The node's expanded state.
iconNoNoNo
The node's icon URI.
labelNoNoRead Only
The label of the Node.
targetNoNoNo
A window target.

See Also:
Tree, TreeNode, Serialized Form
Example:
The following example shows a set of <netui:nodes> arranged to form a tree of navigable links.
  <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>
Beadoc.see:
<netui:tree> Tag Sample, <netui:tree> Tag: Dynamic Tree Sample
Beadoc.tagdescription:
Renders a expandable/collapsable node in a tree.

When displayed in the browser, the <netui:node> has two parts: (1) a clickable icon that controls the expanding and collapsing of the node and (2) hyperlink text that appear immediately to the right of the icon.

The href and label attribute control the properties of the hyperlink text. The href attribute specifies the link's destination, the label specifies the display text of the hyperlink.

The icon attribute controls the display icon for the <netui:node>. Note that the display of icons can be handled automatically through the imageRoot attribute of the Tree tag. If you point the imageRoot attribute at a folder of appropriately named images, then any <netui:node> tags underneath the <netui:tree> will display the appropriate icon depending on the current state of the <netui:node>, i.e., whether it is expanded, collapsed, etc. See the Tree tag for details. The action attribute points to a method in the Controller file that handles clicking on either the icon or the hyperlink.


Field Summary
protected  String action
           
protected  String expanded
           
protected  String href
           
protected  String icon
           
protected  String label
           
protected  TreeNode node
           
protected  String target
           
 
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
Node()
           
 
Method Summary
 int doEndTag()
          Add this node to the parent.
 int doStartTag()
          Instantiate a new TreeNode.
 String getAction()
          Returns the Node's action.
 String getExpanded()
          Gets if the Node is expanded.
 String getHref()
          Gets the Node's href.
 String getIcon()
          Gets the Node icon URI.
 String getLabel()
          Gets the Node label.
 TreeNode getNode()
           
 String getTagName()
          Return the name of the Tag.
 String getTarget()
          Returns the window target.
protected  void localRelease()
          Release any acquired resources.
 void registerError(EvalErrorInfo error)
          This method will add an error to the errors begin tracked by this tag.
 String registerTagError(String message)
          This will report an error from a tag.
 void setAction(String action)
          Set the Node's action.
 void setExpanded(String expanded)
          Sets the Node expansion state.
 void setHref(String href)
          Sets the Node's href.
 void setIcon(String icon)
          Sets the Node icon URI.
 void setLabel(String label)
          Sets the Node label.
 void setNode(TreeNode node)
           
 void setTarget(String target)
          Sets the window target.
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
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

action

protected String action

expanded

protected String expanded

href

protected String href

icon

protected String icon

label

protected String label

node

protected TreeNode node

target

protected String target
Constructor Detail

Node

public Node()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in class AbstractBaseTag

getAction

public String getAction()
Returns the Node's action.

Returns:
the action.

setAction

public void setAction(String action)
Set the Node's action.

Parameters:
action - - the action.
Beadoc.attributedescription:
The action method invoked by clicking the <netui:node>'s icon or hyperlink text.
Beadoc.attributesyntaxvalue:
string_action
Beadoc.databindable:
false

getExpanded

public String getExpanded()
Gets if the Node is expanded.

Returns:
the expanded state.

setExpanded

public void setExpanded(String expanded)
Sets the Node expansion state.

Parameters:
expanded - - the expanded state.
Beadoc.attributedescription:
Boolean. If set to true, then the node is displayed in an expanded state when the page first loads into the browser.
Beadoc.attributesyntaxvalue:
boolean_expanded
Beadoc.databindable:
false

getHref

public String getHref()
Gets the Node's href.

Returns:
the href.

setHref

public void setHref(String href)
Sets the Node's href.

Parameters:
href - - the href
Beadoc.attributedescription:
The destination when the <netui:node>'s hyperlink text is clicked.
Beadoc.attributesyntaxvalue:
string_href
Beadoc.databindable:
false

getIcon

public String getIcon()
Gets the Node icon URI.

Returns:
the icon URI.

setIcon

public void setIcon(String icon)
Sets the Node icon URI.

Parameters:
icon - - the icon URI
Beadoc.attributedescription:
The path to the node's icon. If the root <netui:tree> tag's imageRoot points to a folder, then the path is relative to this folder.
Beadoc.attributesyntaxvalue:
string_icon
Beadoc.databindable:
false

getLabel

public String getLabel()
Gets the Node label.

Returns:
the label.

setLabel

public void setLabel(String label)
Sets the Node label.

Parameters:
label - - the label.
Beadoc.attributedescription:
The text displayed by the <netui:node>'s hyperlink text.
Beadoc.attributesyntaxvalue:
string_label
Beadoc.databindable:
Read Only

getNode

public TreeNode getNode()

setNode

public void setNode(TreeNode node)
Beadoc.attributedescription:
Sets the TreeNode object.
Beadoc.attributesyntaxvalue:
string_treeNode
Beadoc.databindable:
false

getTarget

public String getTarget()
Returns the window target.

Returns:
the window target.

setTarget

public void setTarget(String target)
Sets the window target.

Parameters:
target - - the window target.
Beadoc.attributedescription:
The window target of the <netui:node>'s hyperlink text. Typically the navigation tree and the content are displayed in two different frames. Use this attribute to target the link at the content frame.
Beadoc.attributesyntaxvalue:
string_windowTarget
Beadoc.databindable:
false

registerError

public void registerError(EvalErrorInfo error)
Description copied from class: AbstractBaseTag
This method will add an error to the errors begin tracked by this tag.

Overrides:
registerError in class AbstractBaseTag

registerTagError

public String registerTagError(String message)
Description copied from class: AbstractBaseTag
This will report an error from a tag. The error will contain a message. If error reporting is turned off, the message will be returned and the caller should throw a JspException to report the error.

Overrides:
registerTagError in class AbstractBaseTag
Parameters:
message - - the message to register with the error
Returns:
null

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Instantiate a new TreeNode.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Add this node to the parent.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractBaseTag

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.