com.cc.framework.taglib.controls
Class TreelistTag

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.TreelistTag
All Implemented Interfaces:
AjaxSupportTag, ColumnContainerTag, DesignRuleContainerTag, FrameContainerTag, ImageContainerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, ScriptSupport, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class TreelistTag
extends BaseControlTag
implements FrameContainerTag, ColumnContainerTag

Tag-Handler for the treelist Tag.

Generates a list control element whose underlying data structure is a tree. The data model thus implements the TreeGroupDataModel. The layout of the list can be defined in the JSP-Page. The <treelist>-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.45 $
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
TreelistTag()
          Constructor
 
Method Summary
 void addColumn(ColumnDesignModel column)
          Adds a column to the Collection
 void addInnerFrame(InnerFrame frame)
          Adds a new inner Frame to the container
protected  Control doCreateControl()
          Creates the control element
protected  ControlDesignModel doCreateDesignModel()
          This method is called to create the DesignModel for the control
protected  TreelistControl getCtrl()
          Retrieves the current Control instance
 LineIterator getLineIterator()
          Creates a lne interator which starts with the first line on the current page.
 int getRowsPerPage()
          Returns the number of rows on the page.
protected  TreelistDesignModel getTreelistDesignModel()
          Returns a casted version of the ControlDesignModel
protected  TreelistDesignModel getTreeListDesignModel()
          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 setCellPadding(java.lang.String padding)
          Sets the cell padding for the list cells
 void setCellSpacing(java.lang.String spacing)
          Sets the cell spacing for the list cells
 void setCheckboxes(java.lang.String value)
          Indicates whether a checkbox should be displayed before the tree entries.
 void setCreateButton(java.lang.String value)
          Indicates whether a button for creating a new data record should be displayed.
 void setEmptyText(java.lang.String emptyText)
          A text that is output in the body of the list element if there are no lines available
 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 setExportListButton(java.lang.String value)
          Sets the Flag for the ExportList Button
 void setGroupselect(java.lang.String value)
          Specifies whether, for the group nodes of the tree structure, a Click event handler should be called.
 void setHideButtons(java.lang.String controlButtonList)
          Hides all buttons in the ControlButton List.
 void setImage(ImageModel image)
          Sets the image
 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 setMinRows(int rowCount)
          Sets the number of minimal displayed rows per page
 void setMinRows(java.lang.String rowCount)
          Sets the number of minimal displayed rows per page
 void setNoframe(java.lang.String noframe)
          Disables the list border
 void setNoheader(java.lang.String noheader)
          Disables the list header
 void setPageButtons(int value)
          Sets the number of page buttons
 void setPageButtons(java.lang.String value)
          Sets the number of page buttons
 void setPrintListButton(java.lang.String value)
          Sets the Flag for the PrintList Button
 void setRefreshButton(java.lang.String value)
          Specifies whether a button should be displayed for updating the elements.
 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(int rowCount)
          Sets the number of maximal displayed rows per page
 void setRows(java.lang.String rowCount)
          Sets the number of maximal displayed rows per page
 void setScrollHeight(java.lang.String height)
          Sets the height of the scroll container
 void setSelect(java.lang.String mode)
          Specifies the selection mode of the list.
 void setShowHeader(java.lang.String value)
          If this flag is set to false the header of the control will be suppressed.
 void setTaborientation(java.lang.String orientation)
          Specifies the tabulator orientation of the element: horizontal = from top to bottom vertical = from left to right
 void setTitle(java.lang.String title)
          The main title of the list element.
 
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
 
Methods inherited from interface com.cc.framework.taglib.controls.ColumnContainerTag
getPainterContext
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values
Constructor Detail

TreelistTag

public TreelistTag()
Constructor

Method Detail

getCtrl

protected TreelistControl getCtrl()
Retrieves the current Control instance

Returns:
Control Instance

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()

getTreeListDesignModel

protected TreelistDesignModel getTreeListDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
TreelistDesignModel

getTreelistDesignModel

protected TreelistDesignModel getTreelistDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
TreelistDesignModel

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()

addInnerFrame

public void addInnerFrame(InnerFrame frame)
Description copied from interface: FrameContainerTag
Adds a new inner Frame to the container

Specified by:
addInnerFrame in interface FrameContainerTag
Parameters:
frame - The inner Frame to add
See Also:
FrameContainerTag.addInnerFrame(com.cc.framework.ui.model.InnerFrame)

addColumn

public void addColumn(ColumnDesignModel column)
Description copied from interface: ColumnContainerTag
Adds a column to the Collection

Specified by:
addColumn in interface ColumnContainerTag
Parameters:
column - ColumnDesignModel
See Also:
ColumnContainerTag.addColumn(com.cc.framework.ui.model.ColumnDesignModel)

setTitle

public void setTitle(java.lang.String title)
The main title of the list element. The character string is HTML-encoded before outputting

Parameters:
title - The main title

setEmptyText

public void setEmptyText(java.lang.String emptyText)
A text that is output in the body of the list element if there are no lines available

Parameters:
emptyText - Text to output if there are no lines

setSelect

public void setSelect(java.lang.String mode)
               throws javax.servlet.jsp.JspException
Specifies the selection mode of the list. This is only used if a Check column is to be displayed here as well.

Parameters:
mode - The selection mode of the list.
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to an object of type SelectMode

setRefreshButton

public void setRefreshButton(java.lang.String value)
                      throws javax.servlet.jsp.JspException
Specifies whether a button should be displayed for updating the elements. By specifying an Access Control List, the creation of the button can be restricted to certain users.

Parameters:
value - An Access Control List
Throws:
javax.servlet.jsp.JspException - If the Argument can not be converted to a boolean value

setCreateButton

public void setCreateButton(java.lang.String value)
                     throws javax.servlet.jsp.JspException
Indicates whether a button for creating a new data record should be displayed. By specifying an Access Control List, the creation of new records can be restricted to certain users.

Parameters:
value - An Access Control List
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted to a boolean value

setPrintListButton

public void setPrintListButton(java.lang.String value)
                        throws javax.servlet.jsp.JspException
Sets the Flag for the PrintList Button

Parameters:
value - Flag, true if the Button should be shown
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted to a boolean Value

setExportListButton

public void setExportListButton(java.lang.String value)
                         throws javax.servlet.jsp.JspException
Sets the Flag for the ExportList Button

Parameters:
value - Flag, true if the Button should be shown
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted to a boolean Value

setRows

public void setRows(java.lang.String rowCount)
             throws javax.servlet.jsp.JspException
Sets the number of maximal displayed rows per page

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

setRows

public void setRows(int rowCount)
Sets the number of maximal displayed rows per page

Parameters:
rowCount - Number of rows

setMinRows

public void setMinRows(java.lang.String rowCount)
                throws javax.servlet.jsp.JspException
Sets the number of minimal displayed rows per page

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

setMinRows

public void setMinRows(int rowCount)
Sets the number of minimal displayed rows per page

Parameters:
rowCount - Number of rows

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

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

setPageButtons

public void setPageButtons(java.lang.String value)
                    throws javax.servlet.jsp.JspException
Sets the number of page buttons

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

setPageButtons

public void setPageButtons(int value)
Sets the number of page buttons

Parameters:
value - number of buttons

setCellSpacing

public void setCellSpacing(java.lang.String spacing)
                    throws javax.servlet.jsp.JspException
Sets the cell spacing for the list cells

Parameters:
spacing - Spacing factor
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to integer

setCellPadding

public void setCellPadding(java.lang.String padding)
                    throws javax.servlet.jsp.JspException
Sets the cell padding for the list cells

Parameters:
padding - Padding factor
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to integer

setShowHeader

public void setShowHeader(java.lang.String value)
                   throws javax.servlet.jsp.JspException
If this flag is set to false the header of the control will be suppressed.

Parameters:
value - false if the header should not be painted; true otherwise
Throws:
javax.servlet.jsp.JspException - if the Argument can not be converted to a boolean Value

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

setNoframe

public void setNoframe(java.lang.String noframe)
                throws javax.servlet.jsp.JspException
Disables the list border

Parameters:
noframe - true if the list frame should be hidden
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setNoheader

public void setNoheader(java.lang.String noheader)
                 throws javax.servlet.jsp.JspException
Disables the list header

Parameters:
noheader - true if the list header should be hidden
Throws:
javax.servlet.jsp.JspException - If the Argument can't be converted to boolean

setImage

public void setImage(ImageModel image)
Description copied from interface: ImageContainerTag
Sets the image

Specified by:
setImage in interface ImageContainerTag
Parameters:
image - The image model for the image
See Also:
ImageContainerTag.setImage(com.cc.framework.ui.model.ImageModel)

getLineIterator

public LineIterator getLineIterator()
Description copied from interface: ColumnContainerTag
Creates a lne interator which starts with the first line on the current page.

Specified by:
getLineIterator in interface ColumnContainerTag
Returns:
LineIterator
See Also:
ColumnContainerTag.getLineIterator()

getRowsPerPage

public int getRowsPerPage()
Description copied from interface: ColumnContainerTag
Returns the number of rows on the page. Returns -1 if all rows schould be displayed.

Specified by:
getRowsPerPage in interface ColumnContainerTag
Returns:
The number of rows on the page
See Also:
ColumnContainerTag.getRowsPerPage()

setTaborientation

public void setTaborientation(java.lang.String orientation)
                       throws javax.servlet.jsp.JspException
Specifies the tabulator orientation of the element:

Parameters:
orientation - The tabulator orientation
Throws:
javax.servlet.jsp.JspException - If the argument can't be converted to an OrientationType

setHideButtons

public void setHideButtons(java.lang.String controlButtonList)
                    throws javax.servlet.jsp.JspException
Hides all buttons in the ControlButton List.

Parameters:
controlButtonList - A semicolon delimited list of ControlButton names
Throws:
javax.servlet.jsp.JspException - Is thrown when a invalid ControlButton Name is specified

setScrollHeight

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

Parameters:
height - The height

setLabelWrap

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

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


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