com.cc.framework.taglib.controls
Class TreeTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.cc.framework.taglib.ScriptTagSupport
          extended bycom.cc.framework.taglib.controls.BaseControlTag
              extended bycom.cc.framework.taglib.controls.TreeTag
All Implemented Interfaces:
AjaxSupportTag, DesignRuleContainerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, ScriptSupport, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class TreeTag
extends BaseControlTag

Tag-Handler for the tree Tag.

Generates a construction element based on a TreeGroupDataModel. The layout of the tree can be defined in the JSP-Page. The -tag can only be used in conjunction with a bean that implements the TreeGroupDataModel Interface or is derived from TreeListControl

Since:
1.0
Version:
$Revision: 1.29 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.taglib.controls.BaseControlTag
log
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
TreeTag()
          Constructor
 
Method Summary
protected  Control doCreateControl()
          Creates the control element
protected  ControlDesignModel doCreateDesignModel()
          This method is called to create the DesignModel for the control
protected  TreeDesignModel getTreeDesignModel()
          Returns a casted version of the ControlDesignModel
 void setButtons(java.lang.String value)
          Indicates whether, in case of group nodes, buttons for exploding or closing the branch should be displayed.
 void setCheckboxes(java.lang.String value)
          Indicates whether a checkbox should be displayed before the tree entries.
 void setEnableProperty(java.lang.String value)
          Indicates the name of a property, with the help of which the column function can be disabled in the relevant line.
 void setExpandMode(java.lang.String expand)
          This attribute specifies how many nodes of the tree structure may be displayed exploded at the same time.
 void setFilter(java.lang.String filter)
          The automatic HTML coding of the column contents can be activated or disabled with the filter-attribute.
 void setGroupselect(java.lang.String value)
          Specifies whether, for the group nodes of the tree structure, a Click event handler should be called.
 void setImagemap(java.lang.String mapName)
          Specifies the name of an ImageMap which must be saved in the request.
 void setImageProperty(java.lang.String property)
          Specifies the property using which an image can be assigned to every Row-Bean.
 void setLabelProperty(java.lang.String property)
          Specifies the property using which a label can be assigned to every Row-Bean.
 void setLabelWrap(java.lang.String wrap)
          Enables or disables label wrapping
 void setLines(java.lang.String value)
          Specifies whether connecting lines should be drawn between the construction elements.
 void setLinesAtRoot(java.lang.String value)
          Specifies whether lines should be drawn to the construction elements of the uppermost (displayed) level.
 void setMaxlength(java.lang.String maxlength)
          Specifies the maximum number of characters for the data input or display.
 void setRoot(java.lang.String value)
          Specifies whether the root node of the tree structure (Level 0) should be displayed or whether the display should first start at the next tree level(Level 1).
 void setRows(java.lang.String rowCount)
          Sets the number of Rows Note: Actual not supported
 void setScrollHeight(java.lang.String height)
          Sets the height of the scroll container
 void setTarget(java.lang.String target)
          The HTML-target attribute of the element can be specified with this attribute.
 void setTargetProperty(java.lang.String targetProperty)
          Specifies the name of a property with the help of which the relevant line can generate an HTML-target attribute.
 void setTooltipProperty(java.lang.String tooltipProperty)
          Specifies the name of a property with the help of which the relevant line can generate an HTML-text attribute.
 
Methods inherited from class com.cc.framework.taglib.controls.BaseControlTag
addDesignRule, beginPaint, createControl, createPainter, doEndTag, doStartTag, endPaint, getClientHandler, getControl, getDefaultAction, getDesignModel, getDirectValue, getHttpScope, getPainterContext, lookupBean, release, releaseDesignModel, setAction, setAjax, setAjax, setBorder, setDirectValue, setDisabled, setFormElement, setHeight, setHelp, setId, setLocale, setName, setPageContext, setPermission, setProperty, setRunat, setScope, setShadow, setStyle, setStyleClass, setStyleId, setSummary, setTabindex, setTooltip, setTransaction, setValue, setWidth
 
Methods inherited from class com.cc.framework.taglib.ScriptTagSupport
setOnabort, setOnactivate, setOnafterprint, setOnafterupdate, setOnbeforeactivate, setOnbeforecopy, setOnbeforecut, setOnbeforedeactivate, setOnbeforeeditfocus, setOnbeforepaste, setOnbeforeprint, setOnbeforeunload, setOnbeforeupdate, setOnblur, setOnbounce, setOncellchange, setOnchange, setOncheck, setOncheckall, setOnclick, setOncollapse, setOncontextmenu, setOncontrolselect, setOncopy, setOncut, setOndataavailable, setOndatasetchanged, setOndatasetcomplete, setOndblclick, setOndeactivate, setOndrag, setOndragend, setOndragenter, setOndragleave, setOndragover, setOndragstart, setOndrop, setOnerror, setOnerrorupdate, setOnexpand, setOnexpandex, setOnfilterchange, setOnfinish, setOnfocus, setOnfocusin, setOnfocusout, setOnhelp, setOnkeydown, setOnkeypress, setOnkeyup, setOnlayoutcomplete, setOnload, setOnlosecapture, setOnmousedown, setOnmouseenter, setOnmouseleave, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnmousewheel, setOnmove, setOnmoveend, setOnmovestart, setOnpaste, setOnpropertychange, setOnreadystatechange, setOnreset, setOnresize, setOnresizeend, setOnresizestart, setOnrowenter, setOnrowexit, setOnrowsdelete, setOnrowsinserted, setOnscroll, setOnselect, setOnselectionchange, setOnselectstart, setOnspindown, setOnspinup, setOnstart, setOnstop, setOnsubmit, setOnuncheck, setOnuncheckall, setOnunload
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values
Constructor Detail

TreeTag

public TreeTag()
Constructor

Method Detail

doCreateDesignModel

protected ControlDesignModel doCreateDesignModel()
Description copied from class: BaseControlTag
This method is called to create the DesignModel for the control

Specified by:
doCreateDesignModel in class BaseControlTag
Returns:
A concrete DesignModel
See Also:
BaseControlTag.doCreateDesignModel()

getTreeDesignModel

protected TreeDesignModel getTreeDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
TreeDesignModel

doCreateControl

protected Control doCreateControl()
                           throws javax.servlet.jsp.JspException
Description copied from class: BaseControlTag
Creates the control element

Specified by:
doCreateControl in class BaseControlTag
Returns:
control element
Throws:
javax.servlet.jsp.JspException - If an error during bean lookup occurs
See Also:
BaseControlTag.doCreateControl()

setRows

public void setRows(java.lang.String rowCount)
             throws javax.servlet.jsp.JspException
Sets the number of Rows Note: Actual not supported

Parameters:
rowCount - number of Rows
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to integer

setExpandMode

public void setExpandMode(java.lang.String expand)
                   throws javax.servlet.jsp.JspException
This attribute specifies how many nodes of the tree structure may be displayed exploded at the same time.

Parameters:
expand - Specifies how many nodes of the tree structure may be displayed exploded
Throws:
javax.servlet.jsp.JspException - If the argument can not be converted to an object of type ExpansionMode

setCheckboxes

public void setCheckboxes(java.lang.String value)
                   throws javax.servlet.jsp.JspException
Indicates whether a checkbox should be displayed before the tree entries. The tree entries must implement the Checkable Interface, so that the control element can draw the checkboxes. Group nodes must not implement this interface, since the Check-State of groups can be automatically calculated with the help of the state of the pages.

Parameters:
value - true if checkboxes should be displayed in the tree
Throws:
javax.servlet.jsp.JspException - if the argument can not be converted to a boolean value

setButtons

public void setButtons(java.lang.String value)
                throws javax.servlet.jsp.JspException
Indicates whether, in case of group nodes, buttons for exploding or closing the branch should be displayed. This option has no effect if the expandMode of the tree structure is set to full. In that case, buttons are never shown.

Parameters:
value - true if buttons for exploding or closing the branch should be displayed.
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setLines

public void setLines(java.lang.String value)
              throws javax.servlet.jsp.JspException
Specifies whether connecting lines should be drawn between the construction elements.

Parameters:
value - true if connecting lines should be drawn
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setLinesAtRoot

public void setLinesAtRoot(java.lang.String value)
                    throws javax.servlet.jsp.JspException
Specifies whether lines should be drawn to the construction elements of the uppermost (displayed) level.

Parameters:
value - false if the lines on the top node should not be displayed.
Throws:
javax.servlet.jsp.JspException - if the argument can not be converted to a boolean value

setRoot

public void setRoot(java.lang.String value)
             throws javax.servlet.jsp.JspException
Specifies whether the root node of the tree structure (Level 0) should be displayed or whether the display should first start at the next tree level(Level 1).

Parameters:
value - false if the root element should not be displayed
Throws:
javax.servlet.jsp.JspException - if the argument can not be converted to a boolean value

setImageProperty

public void setImageProperty(java.lang.String property)
Specifies the property using which an image can be assigned to every Row-Bean. The image names do not designate any direct HTML-resources; rather, they are translated into the actual resource names with the help of the ImageMap. Note: Valid Java designator/label for a property which has to be implemented by every Row-Bean!

Parameters:
property - Name of the property to assign an image

setLabelProperty

public void setLabelProperty(java.lang.String property)
Specifies the property using which a label can be assigned to every Row-Bean. Note: Valid Java designator/label for a property which has to be implemented by every Row-Bean!

Parameters:
property - Name of the property

setGroupselect

public void setGroupselect(java.lang.String value)
                    throws javax.servlet.jsp.JspException
Specifies whether, for the group nodes of the tree structure, a Click event handler should be called.

Parameters:
value - true if a Click event handler should be called.
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setImagemap

public void setImagemap(java.lang.String mapName)
                 throws javax.servlet.jsp.JspException
Specifies the name of an ImageMap which must be saved in the request. The values that the ImageProperty returns are mapped to the entries of this ImageMap. The mapping is done with the help of the regular expression, which is assigned to every entry of the ImageMap. The Framework appends, in the case of group nodes, to the value of the ImageProperty, the character strings .open or .closed, in order to be able to distinguish between the open and closed states. By default, the framework uses a folder icon as the image for group nodes. Note: Under the name, there must be an ImageMap saved in the request.

Parameters:
mapName - The ImageMap to assign
Throws:
javax.servlet.jsp.JspException - If the ImageMap can not be found

setTarget

public void setTarget(java.lang.String target)
The HTML-target attribute of the element can be specified with this attribute. Note: See HTML documentation for the attribute target.

Parameters:
target - The HTML-target attribute

setTargetProperty

public void setTargetProperty(java.lang.String targetProperty)
Specifies the name of a property with the help of which the relevant line can generate an HTML-target attribute. Note: Valid Java designator/label. The Row-Bean must implement a suitable property-getter method.

Parameters:
targetProperty - The name of a property

setTooltipProperty

public void setTooltipProperty(java.lang.String tooltipProperty)
Specifies the name of a property with the help of which the relevant line can generate an HTML-text attribute. Note: Valid Java designator/label. The Row-Bean must implement a suitable property-getter method

Parameters:
tooltipProperty - The name of a property

setMaxlength

public void setMaxlength(java.lang.String maxlength)
                  throws javax.servlet.jsp.JspException
Specifies the maximum number of characters for the data input or display.

Parameters:
maxlength - The maximum number of characters
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to integer

setLabelWrap

public void setLabelWrap(java.lang.String wrap)
                  throws javax.servlet.jsp.JspException
Enables or disables label wrapping

Parameters:
wrap - true if the tree should wrap labels
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setFilter

public void setFilter(java.lang.String filter)
               throws javax.servlet.jsp.JspException
The automatic HTML coding of the column contents can be activated or disabled with the filter-attribute. The default is true

Parameters:
filter - true if the column content should be HTML encoded.
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setEnableProperty

public void setEnableProperty(java.lang.String value)
Indicates the name of a property, with the help of which the column function can be disabled in the relevant line. For this, the Row-Bean must provide a corresponding Property Getter, which returns a Boolean data type.

Parameters:
value - enable

setScrollHeight

public void setScrollHeight(java.lang.String height)
Sets the height of the scroll container

Parameters:
height - The height


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.