| com.ivata.groupware.web.tag.webgui.tree.TreeTag
TreeTag | public class TreeTag extends ControlTag (Code) | | Create a tree from a
javax.swing.tree.TreeModel TreeModel .
This tree can be displayed is displayed as an HTML table with links on
each
node.
Tag attributes:
attribute |
reqd. |
param. class |
description |
defaultOpen |
true |
boolean |
Set to true if you want tree nodes to be open by
default. Otherwise they will be closed. |
model |
true |
javax.swing.tree.TreeModel javax.swing.tree.TreeModel |
This model contains the data source for the tree. To use any
datasource
with this tree control, you should first create a class which implements
javax.swing.tree,TreeModel TreeModel . |
renderer |
false |
com.ivata.groupware.web.tree.TreeNodeRenderercom.ivata.groupware.web.tree.TreeNodeRenderer |
This object controls the appearance of each node in the tree,
usually by parsing sections from the
com.ivata.groupware.web.theme.ThemeTheme .
If you do not use this attribute, an instance of
com.ivata.groupware.web.DefaultTreeNodeRendererDefaultTreeNodeRenderer is created and applied. |
treeName |
true |
String |
Specifies a unique identifier for this tree, which is used to store
the state of each foler (open/closed). |
userName |
true |
String |
Name of the user for whom to draw the tree. The state of each node is
stored for this user and the appearance in recalled the next time the tree is
drawn. |
since: 2001-12-15 author: Colin MacLeod author: colin.macleod@ivata.com version: $Revision: 1.3 $ |
Constructor Summary | |
public | TreeTag() |
CHILDREN_PROPERTY | final static String CHILDREN_PROPERTY(Code) | | This is the special property used to identify the location
of the children in the open tag.
Note that this has to be specified exactly, with
no spaces.
|
TreeTag | public TreeTag()(Code) | | Default constructor.
|
doStartTag | public int doStartTag() throws JspException(Code) | | This method is called when the JSP engine encounters the start
tag,
after the attributes are processed.
Scripting variables (if any) have their values set here.
SKIP_BODY if this tag has no body or itshould be skipped, otherwise EVAL_BODY_BUFFERED throws: JspException - if there is an error retrieving thenavigationobject. throws: JspException - if there is no settings object in thesession. throws: JspException - if there is an error wrting toout.print() |
getCloseFolder | final public Integer getCloseFolder()(Code) | | Specifies the id of a folder you wish to close.
the current value of the folder which will be closed, ornull if no folder will be closed. |
getDefaultOpen | final public boolean getDefaultOpen()(Code) | | Decides whether folders should be open or closed by default.
true if folders should be opened by default,otherwise false . |
getFormName | final public String getFormName()(Code) | | Get the name of form which will submit when you open or close
folder.
String name of form |
getModel | final public TreeModel getModel()(Code) | | Get the value supplied to the attribute 'model'.
This model contains the data source for the tree. To use any
datasource
with this tree control, you should first create a class which
implements
javax.swing.tree,TreeModel TreeModel .
the value supplied to the tag attribute 'model'. |
getOpenFolder | final public Integer getOpenFolder()(Code) | | Specifies the id of a folder you wish to open.
the current value of the folder which will be opened, ornull if no folder will be opened. |
getRenderer | final public TreeNodeRenderer getRenderer()(Code) | | Get the value supplied to the attribute 'renderer'.
This object controls the appearance of each node in the tree,
usually
by
parsing sections from the
com.ivata.groupware.web.theme.ThemeTheme .
If you do not use this attribute, an instance of
com.ivata.groupware.web.DefaultTreeNodeRendererDefaultTreeNodeRenderer is created and applied.
the value supplied to the tag attribute 'renderer'. |
getTreeName | final public String getTreeName()(Code) | | Get the value supplied to the attribute 'treeName'.
This attribute specifies a unique identifier for this tree,
which is
used to store the state of each foler (open/closed).
the value supplied to the tag attribute 'treeName'. |
setCloseFolder | final public void setCloseFolder(Integer closeFolderParam)(Code) | | Specifies the id of a folder you wish to close.
Parameters: closeFolderParam - the new value of the folder you wish to close.Not setting or setting to null results in no folder beingclosed. |
setDefaultOpen | final public void setDefaultOpen(boolean defaultOpenParam)(Code) | | Decides whether folders should be open or closed by default.
Parameters: defaultOpenParam - set to true if folders should beopened by default, otherwise false . |
setFormName | final public void setFormName(String formNameParam)(Code) | | Set the name of form submit when you open or close a folder.
Parameters: formNameParam - The name of form submit when you open or close afolder. |
setModel | final public void setModel(TreeModel modelParam)(Code) | | Set the value supplied to the attribute 'model'.
This model contains the data source for the tree. To use any
datasource
with this tree control, you should first create a class which
implements
javax.swing.tree,TreeModel TreeModel .
Parameters: modelParam - the new value supplied to the tag attribute 'model'. |
setOpenFolder | final public void setOpenFolder(Integer openFolderParam)(Code) | | Specifies the id of a folder you wish to open.
Parameters: openFolderParam - the new value of the folder you wish to open. Notsettingor setting to null results in no folder being opened. |
setRenderer | final public void setRenderer(TreeNodeRenderer rendererParam)(Code) | | Set the value supplied to the attribute 'renderer'.
This object controls the appearance of each node in the tree,
usually
by
parsing sections from the
com.ivata.groupware.web.theme.ThemeTheme .
If you do not use this attribute, an instance of
com.ivata.groupware.web.DefaultTreeNodeRendererDefaultTreeNodeRenderer is created and applied.
Parameters: rendererParam - the new value supplied to the tag attribute'renderer'. |
setTreeName | final public void setTreeName(String treeNameParam)(Code) | | Set the value supplied to the attribute 'treeName'.
This attribute specifies a unique identifier for this tree,
which is
used to store the state of each foler (open/closed).
Parameters: treeNameParam - the new value supplied to the tag attribute'treeName'. |
|
|