com.cc.framework.taglib.controls
Class ListTag

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.ListTag
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 ListTag
extends BaseControlTag
implements FrameContainerTag, ColumnContainerTag

Tag-Handler for the list Tag.

Generates a multiple column list element based on a ListDataModel. The layout of the list can be defined in the JSP-Page with the help of the <columnXXXX>-tags. The output format of the list element (HTML, XML, JavaApplet, etc.) is determined by the Painter Factory used. The <list>-tag can only be used in conjunction with a Bean that implements the ListDataModel interface.

Since:
1.0
Version:
$Revision: 1.48 $
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
ListTag()
          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  ListControl getCtrl()
          Retrieves the current Control instance
 LineIterator getLineIterator()
          Creates a lne interator which starts with the first line on the current page.
protected  ListDesignModel getListDesignModel()
          Returns a casted version of the ControlDesignModel
 int getRowsPerPage()
          Returns the number of rows on the page.
 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 setCreateButton(java.lang.String value)
          Sets the Flag for the CreateButton
 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 setExportListButton(java.lang.String value)
          Sets the Flag for the ExportList Button
 void setHideButtons(java.lang.String controlButtonList)
          Hides all buttons in the ControlButton List.
 void setImage(ImageModel image)
          Sets the image
 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)
          Sets the Flag for the RefreshButton
 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

ListTag

public ListTag()
Constructor

Method Detail

getCtrl

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

getListDesignModel

protected ListDesignModel getListDesignModel()
Returns a casted version of the ControlDesignModel

Returns:
ListDesignModel

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

Parameters:
title - The 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

setRows

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

Parameters:
rowCount - 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

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
Sets the Flag for the RefreshButton

Parameters:
value - Flag, true if the RefreshButton should be painted
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
Sets the Flag for the CreateButton

Parameters:
value - Flag, true if the CreateButton should be painted
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

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

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


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