com.cc.framework.ui.control
Class ListControl

java.lang.Object
  extended bycom.cc.framework.ui.control.Control
      extended bycom.cc.framework.ui.control.ListControl
All Implemented Interfaces:
AccessControlled, ActionBehavior, ClientHandler, java.io.Serializable
Direct Known Subclasses:
SimpleListControl, TreelistControl

public abstract class ListControl
extends Control

Base class for list controls

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

Nested Class Summary
protected static class ListControl.RowFilter
          Simple Row Filter
 
Field Summary
private static long serialVersionUID
          Serial Version UID
 
Fields inherited from class com.cc.framework.ui.control.Control
log
 
Constructor Summary
ListControl()
          Constructor for ListControl
 
Method Summary
 boolean allowAjaxRendering()
          The list control can be sent back in an AJAX response delta stream in most cases.
 java.lang.String getAjaxId()
          Returns the AJAX container id of the control or null when the control is not AJAX relevant
abstract  int getCellPadding()
          Returns the cell padding for the list cells
abstract  int getCellSpacing()
          Returns the cell spacing for the list cells
abstract  ColumnDesignModel[] getColumns()
          Returns an Array with all columns.
abstract  int getCurrentPage()
          Returns the number of the current page which is displayed.
abstract  java.lang.String[] getDetailText()
          Returns the detail text which is displayed in the caption in the format "3 to 10 from 2000"
abstract  java.lang.String getEmptyText()
          A text that is output in the body of the list element if there are no lines available (size() == 0)
abstract  ImageModel getImage()
          Returns the image for the frames title
abstract  InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
          Retrieves a list of inner frames
abstract  LineIterator getLineIterator(boolean positioned)
          Creates a line iterator
abstract  int getMinRowCount()
          Returns the minimal number of rows on the page.
 int getNavigationPosition()
          Returns a bit combination with the position where to create the page navigation elements of the list control
abstract  int getPageButtons()
          Returns the number of page buttons.
abstract  LineIterator getPageLineIterator()
          Creates a line iterator for the current page
abstract  java.lang.Object getRowFromKey(java.lang.String rowkey)
          Retrieves the row bean for the given key
abstract  int getRowsPerPage()
          Returns the number of rows on the page.
abstract  java.lang.String getScrollHeight()
          Retrieves the height of the scroll container
abstract  SelectMode getSelectMode()
          Return the selection mode of the list.
abstract  SortOrder getSortOrder(java.lang.String column)
          Returns the sort order for the specified column.
abstract  OrientationType getTabOrientation()
          Retrieves the tabulator orientation
abstract  java.lang.String getTitle()
          Returns the Title
abstract  int getTotalPages()
          Returns the total number of pages.
abstract  int getTotalRowCount()
          Returns the Number of total Rows in the data model
 ColumnDesignModel[] getVisibleColumns()
          Returns an Array with all columns that are visible to the user.
 void onAdd(ControlRequestContext ctx, java.lang.String key)
          Default handler for the Add Event
 void onCellClick(ControlRequestContext ctx, java.lang.String column, java.lang.String key)
          Default handler for the CellClick Event
 void onCheck(ControlRequestContext ctx, java.lang.String key, SelectMode mode, boolean check)
          Default handler for the Check Event
 void onCheckAll(ControlRequestContext ctx, SelectMode mode, boolean check)
          Default handler for the CheckAll Event
 void onCheckColumn(ControlRequestContext ctx, java.lang.String column, boolean check)
          Default handler for the CheckColumn Event
 void onCollapse(ControlRequestContext ctx, java.lang.String key)
          Default Handler for the Collapse Event
 void onCreate(ControlRequestContext ctx)
          Default handler for the Create Event
 void onDelete(ControlRequestContext ctx, java.lang.String key)
          Default handler for the Delete Event
 void onDrilldown(ControlRequestContext ctx, java.lang.String key)
          Default handler for the Drilldown Event
 void onEdit(ControlRequestContext ctx, java.lang.String key)
          Default handler for the Edit Event
 void onExpand(ControlRequestContext ctx, java.lang.String key)
          Default Handler for the Expand Event
 void onExpandEx(ControlRequestContext ctx, java.lang.String key)
          Default Handler for the ExpandEx Event
 void onExportList(ControlRequestContext ctx)
          Default handler for the ExportList Event
 void onPage(ControlRequestContext ctx, int newPage)
          Default handler for the Page Event
 void onPrintList(ControlRequestContext ctx)
          Default handler for the PrintList Event
 void onRefresh(ControlRequestContext ctx)
          Default handler for the Refresh Event
 void onSelect(ControlRequestContext ctx, java.lang.String key)
          Default handler for the Select Event
 void onSort(ControlRequestContext ctx, java.lang.String column, SortOrder direction)
          Default handler for the Sort Event
protected  void setCheckboxValue(RequestContext ctx, ControlValuePath path, java.lang.Object rowbean, java.lang.String property, boolean checked, SelectMode selectmode)
          This method is called to set the value of a checkbox column
protected  void setControlValue(RequestContext ctx, ControlValuePath path, java.lang.Object rowbean, java.lang.String property, java.lang.String[] values)
          This method sets the value of a nested control
protected  void setRadioValue(RequestContext ctx, ControlValuePath path, java.lang.Object rowbean, java.lang.String property, java.lang.String value)
          This method is called to set the value of a radio button column
 void setValue(RequestContext ctx, ControlValuePath path, java.lang.String[] values)
          This method is called to set the value of the data model
abstract  boolean showFrame()
          Returns true if the frame should be painted
abstract  boolean showHeader()
          Returns true if the header should be painted
 
Methods inherited from class com.cc.framework.ui.control.Control
addButton, execute, execute, execute, execute, execute, execute, execute, getAction, getButtons, getControlName, getDataModel, getDesignModel, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStateModel, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, show, showButton, synchronizeState, synchronizeState
 
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

ListControl

public ListControl()
Constructor for ListControl

Method Detail

getTitle

public abstract java.lang.String getTitle()
Returns the Title

Returns:
String

getDetailText

public abstract java.lang.String[] getDetailText()
Returns the detail text which is displayed in the caption in the format "3 to 10 from 2000"

Returns:
String

getEmptyText

public abstract java.lang.String getEmptyText()
A text that is output in the body of the list element if there are no lines available (size() == 0)

Returns:
String

getTotalPages

public abstract int getTotalPages()
Returns the total number of pages.

Returns:
The total number of pages. Returns -1 if the number of pages is unknown

getTotalRowCount

public abstract int getTotalRowCount()
Returns the Number of total Rows in the data model

Returns:
number of rows. Returns -1 when the number of rows is unknown

getCurrentPage

public abstract int getCurrentPage()
Returns the number of the current page which is displayed.

Returns:
The number of the current page

getRowsPerPage

public abstract int getRowsPerPage()
Returns the number of rows on the page. Returns -1 if all rows should be displayed.

Returns:
The number of rows on the page

getMinRowCount

public abstract int getMinRowCount()
Returns the minimal number of rows on the page. Returns -1 no empty lines should be displayed.

Returns:
The minimal number of rows on the page

getPageButtons

public abstract int getPageButtons()
Returns the number of page buttons.

Returns:
The number of page buttons

showFrame

public abstract boolean showFrame()
Returns true if the frame should be painted

Returns:
true if the frame should be painted

showHeader

public abstract boolean showHeader()
Returns true if the header should be painted

Returns:
true if the header should be painted

getCellSpacing

public abstract int getCellSpacing()
Returns the cell spacing for the list cells

Returns:
spacing factor

getCellPadding

public abstract int getCellPadding()
Returns the cell padding for the list cells

Returns:
Padding factor

getScrollHeight

public abstract java.lang.String getScrollHeight()
Retrieves the height of the scroll container

Returns:
height

getAjaxId

public java.lang.String getAjaxId()
Returns the AJAX container id of the control or null when the control is not AJAX relevant

Overrides:
getAjaxId in class Control
Returns:
AJAX id or null

allowAjaxRendering

public boolean allowAjaxRendering()
The list control can be sent back in an AJAX response delta stream in most cases. But it is not possible to fully render a list control with HTML columns. In this cases the JSP processing is required.

Overrides:
allowAjaxRendering in class Control
Returns:
returns true when the control can be rendered in an AJAX response
See Also:
Control.allowAjaxRendering()

getNavigationPosition

public int getNavigationPosition()
Returns a bit combination with the position where to create the page navigation elements of the list control

Returns:
Bit combination
See Also:
NavigationPosition

getLineIterator

public abstract LineIterator getLineIterator(boolean positioned)
Creates a line iterator

Parameters:
positioned - if set to true the method returns a iterator which is positioned on the first line on the current page.
Returns:
LineIterator

getPageLineIterator

public abstract LineIterator getPageLineIterator()
Creates a line iterator for the current page

Returns:
LineIterator

getInnerFrames

public abstract InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
Retrieves a list of inner frames

Parameters:
layoutHint - The layout hint that specifies what frames should be selected: AlignmentType.TOP - header frames AlignmentType.BOTTOM - footer frames
Returns:
Frame list

getVisibleColumns

public ColumnDesignModel[] getVisibleColumns()
Returns an Array with all columns that are visible to the user.

Returns:
ColumnDesignModel

getColumns

public abstract ColumnDesignModel[] getColumns()
Returns an Array with all columns.

Returns:
ColumnDesignModel

getSortOrder

public abstract SortOrder getSortOrder(java.lang.String column)
Returns the sort order for the specified column.

Parameters:
column - The name of the column
Returns:
SortOrder

getSelectMode

public abstract SelectMode getSelectMode()
Return the selection mode of the list.

Returns:
SelectMode

getRowFromKey

public abstract java.lang.Object getRowFromKey(java.lang.String rowkey)
Retrieves the row bean for the given key

Parameters:
rowkey - The rows unique key
Returns:
Row Bean or null

getImage

public abstract ImageModel getImage()
Returns the image for the frames title

Returns:
ImageModel

getTabOrientation

public abstract OrientationType getTabOrientation()
Retrieves the tabulator orientation

Returns:
the orientation

setValue

public void setValue(RequestContext ctx,
                     ControlValuePath path,
                     java.lang.String[] values)
              throws java.lang.Exception
Description copied from class: Control
This method is called to set the value of the data model

Overrides:
setValue in class Control
Parameters:
ctx - The Action Context
path - Path Name of the input element
values - the values to set
Throws:
java.lang.Exception - a derived class can throw an exception if the value could not be set
See Also:
Control.setValue(com.cc.framework.adapter.RequestContext, com.cc.framework.ui.control.ControlValuePath, java.lang.String[])

setCheckboxValue

protected void setCheckboxValue(RequestContext ctx,
                                ControlValuePath path,
                                java.lang.Object rowbean,
                                java.lang.String property,
                                boolean checked,
                                SelectMode selectmode)
                         throws java.lang.Exception
This method is called to set the value of a checkbox column

Parameters:
ctx - The control action context
path - Path Name of the input element
rowbean - The row bean
property - The Column name
checked - true if the checkbox is checked
selectmode - the selection mode of the column
Throws:
java.lang.Exception - a derived class can throw an exception if the value could not be set

setRadioValue

protected void setRadioValue(RequestContext ctx,
                             ControlValuePath path,
                             java.lang.Object rowbean,
                             java.lang.String property,
                             java.lang.String value)
                      throws java.lang.Exception
This method is called to set the value of a radio button column

Parameters:
ctx - The control action context
path - Path Name of the input element
rowbean - The row bean
property - The Column name
value - the radio button value
Throws:
java.lang.Exception - a derived class can throw an exception if the value could not be set

setControlValue

protected void setControlValue(RequestContext ctx,
                               ControlValuePath path,
                               java.lang.Object rowbean,
                               java.lang.String property,
                               java.lang.String[] values)
                        throws java.lang.Exception
This method sets the value of a nested control

Parameters:
ctx - The Control Action Context
path - Path Name of the input element
rowbean - The row bean
property - The Column name
values - the value to set
Throws:
java.lang.Exception - a derived class can throw an exception if the value could not be set

onExpandEx

public void onExpandEx(ControlRequestContext ctx,
                       java.lang.String key)
                throws java.lang.Exception
Default Handler for the ExpandEx Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onExpand

public void onExpand(ControlRequestContext ctx,
                     java.lang.String key)
              throws java.lang.Exception
Default Handler for the Expand Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onCollapse

public void onCollapse(ControlRequestContext ctx,
                       java.lang.String key)
                throws java.lang.Exception
Default Handler for the Collapse Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onCreate

public void onCreate(ControlRequestContext ctx)
              throws java.lang.Exception
Default handler for the Create Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onRefresh

public void onRefresh(ControlRequestContext ctx)
               throws java.lang.Exception
Default handler for the Refresh Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onPage

public void onPage(ControlRequestContext ctx,
                   int newPage)
            throws java.lang.Exception
Default handler for the Page Event

Parameters:
ctx - ControlRequestContext
newPage - Number of the new Page
Throws:
java.lang.Exception - is thrown when an error occurs

onDrilldown

public void onDrilldown(ControlRequestContext ctx,
                        java.lang.String key)
                 throws java.lang.Exception
Default handler for the Drilldown Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onCellClick

public void onCellClick(ControlRequestContext ctx,
                        java.lang.String column,
                        java.lang.String key)
                 throws java.lang.Exception
Default handler for the CellClick Event

Parameters:
ctx - ControlRequestContext
column - Name of the Column (Name is the Property)
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onAdd

public void onAdd(ControlRequestContext ctx,
                  java.lang.String key)
           throws java.lang.Exception
Default handler for the Add Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onEdit

public void onEdit(ControlRequestContext ctx,
                   java.lang.String key)
            throws java.lang.Exception
Default handler for the Edit Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onDelete

public void onDelete(ControlRequestContext ctx,
                     java.lang.String key)
              throws java.lang.Exception
Default handler for the Delete Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onSelect

public void onSelect(ControlRequestContext ctx,
                     java.lang.String key)
              throws java.lang.Exception
Default handler for the Select Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
Throws:
java.lang.Exception - is thrown when an error occurs

onCheck

public void onCheck(ControlRequestContext ctx,
                    java.lang.String key,
                    SelectMode mode,
                    boolean check)
             throws java.lang.Exception
Default handler for the Check Event

Parameters:
ctx - ControlRequestContext
key - Unique Id as generated by the data model to identify the Row
mode - SelectMode
check - true if checked
Throws:
java.lang.Exception - Indicates an error while iterating and executing the algorithm

onCheckAll

public void onCheckAll(ControlRequestContext ctx,
                       SelectMode mode,
                       boolean check)
                throws java.lang.Exception
Default handler for the CheckAll Event

Parameters:
ctx - ControlRequestContext
mode - SelectMode
check - true if checked
Throws:
java.lang.Exception - Indicates an error while iterating and executing the algorithm

onCheckColumn

public void onCheckColumn(ControlRequestContext ctx,
                          java.lang.String column,
                          boolean check)
                   throws java.lang.Exception
Default handler for the CheckColumn Event

Parameters:
ctx - ControlRequestContext
column - Name of the Column (Name is the Property)
check - true if checked
Throws:
java.lang.Exception - Indicates an error while iterating and executing the algorithm

onSort

public void onSort(ControlRequestContext ctx,
                   java.lang.String column,
                   SortOrder direction)
            throws java.lang.Exception
Default handler for the Sort Event

Parameters:
ctx - ControlRequestContext
column - Name of the Column
direction - SortOrder
Throws:
java.lang.Exception - is thrown when an error occurs

onExportList

public void onExportList(ControlRequestContext ctx)
                  throws java.lang.Exception
Default handler for the ExportList Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs

onPrintList

public void onPrintList(ControlRequestContext ctx)
                 throws java.lang.Exception
Default handler for the PrintList Event

Parameters:
ctx - ControlRequestContext
Throws:
java.lang.Exception - is thrown when an error occurs


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