|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.control.Control com.cc.framework.ui.control.ListControl com.cc.framework.ui.control.SimpleListControl
The SimpleListControl
Nested Class Summary |
Nested classes inherited from class com.cc.framework.ui.control.ListControl |
ListControl.RowFilter |
Field Summary | |
private ListDataModel |
dataModel
The data model |
private ListDesignModel |
designModel
The Designmodel |
private static long |
serialVersionUID
Serial Version UID |
private ListStateModel |
stateModel
The state model |
Fields inherited from class com.cc.framework.ui.control.Control |
log |
Fields inherited from interface com.cc.framework.ui.model.ListStateModel |
PROP_PAGE |
Fields inherited from interface com.cc.framework.ui.model.StateModel |
PROP_CONTROL |
Constructor Summary | |
SimpleListControl()
Constructor |
Method Summary | |
int |
calcAbsoulteRowIndex(int relRowIndex)
Berechent anhand eines seitenrelativen Zeilenindex einen absoluten Index. |
int |
calcRelativeRowIndex(int absRowIndex)
Berechent anhand eines absoluten Zeilenindex einen seitenrelativen Index. |
protected ListStateModel |
doCreateStatemodel()
Creates the state model for this control instance |
int |
getCellPadding()
Returns the cell padding for the list cells |
int |
getCellSpacing()
Returns the cell spacing for the list cells |
ColumnDesignModel[] |
getColumns()
Returns an Array with all columns. |
int |
getCurrentPage()
Returns the zero based index of the page which is currently display. |
DataModel |
getDataModel()
Returns the data model of the Control |
ControlDesignModel |
getDesignModel()
Returns the design model of the control |
java.lang.String[] |
getDetailText()
Returns the detail text which is displayed in the caption in the format "3 to 10 from 2000" |
java.lang.String |
getEmptyText()
A text that is output in the body of the list element if there are no lines available (size() == 0) |
ImageModel |
getImage()
Returns the image for the frames title |
InnerFrame[] |
getInnerFrames(java.lang.Object layoutHint)
Retrieves a list of inner frames that are matching the given layout hint |
LineIterator |
getLineIterator(boolean positioned)
Creates a line iterator |
java.lang.String[] |
getMarked()
Retrieves all marked items |
int |
getMinRowCount()
Returns the minimal number of rows on the page. |
int |
getPageButtons()
Returns the number of page buttons. |
LineIterator |
getPageLineIterator()
Creates a line iterator for the current page |
java.lang.Object |
getRowFromKey(java.lang.String rowkey)
Retrieves the row bean for the given key |
int |
getRowsOnCurrentPage()
Calculates the Number of rows which should be displayed on the Page |
int |
getRowsPerPage()
Returns the number of rows on the page. |
java.lang.String |
getScrollHeight()
Retrieves the height of the scroll container |
SelectMode |
getSelectMode()
Return the selection mode of the list. |
java.lang.String |
getSortColumn()
Returns the name of the column which is currently used for sorting. |
SortOrder |
getSortOrder()
Returns the sort order |
SortOrder |
getSortOrder(java.lang.String column)
Returns the sort order for the specified column. |
StateModel |
getStateModel()
Returns the state model of the control |
OrientationType |
getTabOrientation()
Retrieves the tabulator orientation |
java.lang.String |
getTitle()
Returns the Title |
int |
getTotalPages()
Returns the total number of pages. |
int |
getTotalRowCount()
Returns the Number of total Rows in the data model |
boolean |
isFirstPage()
Returns true if the First Page is displayed |
boolean |
isLastPage()
Returns true if the Last Page is displayed |
boolean |
isMarked(java.lang.String uniqueKey)
Checks if the specified row is selected. |
void |
mark(java.lang.String uniqueKey)
Selects a specified row. |
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 |
onPage(ControlRequestContext ctx,
int newPage)
Default handler for the Page Event |
void |
onSort(ControlRequestContext ctx,
java.lang.String column,
SortOrder direction)
Default handler for the Sort Event |
void |
reset()
Resets the actual state of a control to the initial state |
void |
resetSortInfo()
Resets any sorting Information |
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 |
void |
setCurrentPage(int page)
Sets the index for the page which is currently display to another value. |
void |
setDataModel(ListDataModel dataModel)
Sets the data model |
void |
setDataModel(ListDataModel dataModel,
boolean keepState)
Sets the data model |
void |
setDesignModel(ListDesignModel designModel)
Sets the DesignModel |
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 |
setSortInfo(java.lang.String column,
SortOrder direction)
Sets the sort order for the specified column |
void |
setStateModel(ListStateModel stateModel)
Sets the StateModel |
boolean |
showButton(ControlButton button)
This Method is called by the Painter before rendering a Button. |
boolean |
showFrame()
Returns true if the frame should be painted |
boolean |
showHeader()
Returns true if the header should be painted |
void |
unmark(java.lang.String uniqueKey)
Unselects a specified row. |
void |
unmarkAll()
Unselects all selected rows |
Methods inherited from class com.cc.framework.ui.control.ListControl |
allowAjaxRendering, getAjaxId, getNavigationPosition, getVisibleColumns, onAdd, onCellClick, onCollapse, onCreate, onDelete, onDrilldown, onEdit, onExpand, onExpandEx, onExportList, onPrintList, onRefresh, onSelect, setControlValue, setValue |
Methods inherited from class com.cc.framework.ui.control.Control |
addButton, execute, execute, execute, execute, execute, execute, execute, getAction, getButtons, getControlName, getDesignRules, getFrameworkString, getHandler, getHandlers, getHeight, getHelp, getId, getLocaleName, getName, getPermission, getPrincipal, getProperty, getRunAt, getStyle, getStyleClass, getStyleId, getSummary, getTabIndex, getTooltip, getTransaction, getUniqueStyleId, getWidth, isAjaxEnabled, isDisabled, isFormElement, markDirty, onHelp, setAjaxAttribute, setHandler, setPrincipal, show, synchronizeState, synchronizeState |
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.ui.model.StateModel |
synchronizeState |
Field Detail |
private static final long serialVersionUID
private ListDataModel dataModel
private ListDesignModel designModel
private ListStateModel stateModel
Constructor Detail |
public SimpleListControl()
Method Detail |
protected ListStateModel doCreateStatemodel()
public DataModel getDataModel()
Control
getDataModel
in class Control
Control.getDataModel()
public void setDataModel(ListDataModel dataModel)
dataModel
- DataModelpublic void setDataModel(ListDataModel dataModel, boolean keepState)
dataModel
- TreeGroupDataModelkeepState
- when set to true
the treelist control will keep
its current state (Expanded nodes current page etc.)public ControlDesignModel getDesignModel()
Control
getDesignModel
in class Control
Control.getDesignModel()
public void setDesignModel(ListDesignModel designModel)
designModel
- ListDesignModelpublic StateModel getStateModel()
Control
getStateModel
in class Control
Control.getStateModel()
public void setStateModel(ListStateModel stateModel)
stateModel
- ListStateModelpublic int getPageButtons()
ListControl
getPageButtons
in class ListControl
ListControl.getPageButtons()
public boolean showFrame()
ListControl
showFrame
in class ListControl
ListControl.showFrame()
public boolean showHeader()
ListControl
showHeader
in class ListControl
ListControl.showHeader()
public int getCellPadding()
ListControl
getCellPadding
in class ListControl
ListControl.getCellPadding()
public int getCellSpacing()
ListControl
getCellSpacing
in class ListControl
ListControl.getCellSpacing()
public OrientationType getTabOrientation()
ListControl
getTabOrientation
in class ListControl
ListControl.getTabOrientation()
public boolean showButton(ControlButton button)
Control
showButton
in class Control
button
- ControlButton
Control.showButton(com.cc.framework.ui.control.ControlButton)
public ColumnDesignModel[] getColumns()
ListControl
getColumns
in class ListControl
ListControl.getColumns()
public LineIterator getLineIterator(boolean positioned)
ListControl
getLineIterator
in class ListControl
positioned
- if set to true
the method returns a iterator
which is positioned on the first line on the current page.
ListControl.getLineIterator(boolean)
public LineIterator getPageLineIterator()
ListControl
getPageLineIterator
in class ListControl
ListControl.getPageLineIterator()
public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
getInnerFrames
in class ListControl
layoutHint
- The layout hint that specifies what frames should be selected:
public int getCurrentPage()
ListStateModel
getCurrentPage
in interface ListStateModel
getCurrentPage
in class ListControl
ListControl.getCurrentPage()
public void setCurrentPage(int page)
ListStateModel
setCurrentPage
in interface ListStateModel
page
- The new page indexListStateModel.setCurrentPage(int)
public java.lang.String getSortColumn()
ListStateModel
getSortColumn
in interface ListStateModel
ListStateModel.getSortColumn()
public SortOrder getSortOrder()
ListStateModel
getSortOrder
in interface ListStateModel
ListStateModel.getSortOrder()
public SortOrder getSortOrder(java.lang.String column)
ListControl
getSortOrder
in class ListControl
column
- The name of the column
ListControl.getSortOrder(java.lang.String)
public void setSortInfo(java.lang.String column, SortOrder direction)
setSortInfo
in interface ListStateModel
column
- Name of the columndirection
- The sort orderpublic void resetSortInfo()
ListStateModel
resetSortInfo
in interface ListStateModel
ListStateModel.resetSortInfo()
public void reset()
StateModel
reset
in interface StateModel
StateModel.reset()
public int getRowsPerPage()
ListControl
getRowsPerPage
in class ListControl
ListControl.getRowsPerPage()
public int getMinRowCount()
ListControl
getMinRowCount
in class ListControl
ListControl.getMinRowCount()
public int getTotalRowCount()
getTotalRowCount
in class ListControl
public int getTotalPages()
ListControl
getTotalPages
in class ListControl
ListControl.getTotalPages()
public int getRowsOnCurrentPage()
public int calcAbsoulteRowIndex(int relRowIndex)
relRowIndex
- nullbasierter seitenrelativer Zeilenindex
public int calcRelativeRowIndex(int absRowIndex)
absRowIndex
- nullbasierter sabsoluter Zeilenindex
public java.lang.String getTitle()
ListControl
getTitle
in class ListControl
ListControl.getTitle()
public java.lang.String[] getDetailText()
ListControl
getDetailText
in class ListControl
ListControl.getDetailText()
public ImageModel getImage()
ListControl
getImage
in class ListControl
ListControl.getImage()
public java.lang.String getEmptyText()
ListControl
getEmptyText
in class ListControl
ListControl.getEmptyText()
public SelectMode getSelectMode()
ListControl
getSelectMode
in class ListControl
ListControl.getSelectMode()
public java.lang.String getScrollHeight()
ListControl
getScrollHeight
in class ListControl
ListControl.getScrollHeight()
public boolean isFirstPage()
public boolean isLastPage()
public java.lang.Object getRowFromKey(java.lang.String rowkey)
ListControl
getRowFromKey
in class ListControl
rowkey
- The rows unique key
null
ListControl.getRowFromKey(java.lang.String)
protected void setCheckboxValue(RequestContext ctx, ControlValuePath path, java.lang.Object rowbean, java.lang.String property, boolean checked, SelectMode selectmode) throws java.lang.Exception
setCheckboxValue
in class ListControl
ctx
- The Control action contextpath
- Path Name of the input elementrowbean
- The row beanproperty
- The Column namechecked
- true
if the checkbox is checkedselectmode
- the selection mode of the column
java.lang.Exception
- a derived class can throw an exception if the value could not
be setprotected void setRadioValue(RequestContext ctx, ControlValuePath path, java.lang.Object rowbean, java.lang.String property, java.lang.String value) throws java.lang.Exception
setRadioValue
in class ListControl
ctx
- The control action contextpath
- Path Name of the input elementrowbean
- The row beanproperty
- The Column namevalue
- the radio button value
java.lang.Exception
- a derived class can throw an exception if the value could not
be setpublic boolean isMarked(java.lang.String uniqueKey)
ListStateModel
isMarked
in interface ListStateModel
uniqueKey
- The unique key
ListStateModel.isMarked(java.lang.String)
public java.lang.String[] getMarked()
ListStateModel
getMarked
in interface ListStateModel
ListStateModel.getMarked()
public void mark(java.lang.String uniqueKey)
ListStateModel
mark
in interface ListStateModel
uniqueKey
- The unique key of the row which should be selectedListStateModel.mark(java.lang.String)
public void unmark(java.lang.String uniqueKey)
ListStateModel
unmark
in interface ListStateModel
uniqueKey
- The unique key of the row which should be unselectedListStateModel.unmark(java.lang.String)
public void unmarkAll()
ListStateModel
unmarkAll
in interface ListStateModel
ListStateModel.unmarkAll()
public void onPage(ControlRequestContext ctx, int newPage) throws java.lang.Exception
onPage
in class ListControl
ctx
- ControlRequestContextnewPage
- Number of the new Page
java.lang.Exception
- is thrown when an error occurspublic void onCheck(ControlRequestContext ctx, java.lang.String key, SelectMode mode, boolean check) throws java.lang.Exception
onCheck
in class ListControl
ctx
- ControlRequestContextkey
- Unique Id as generated by the data model to identify the Rowmode
- SelectModecheck
- true if checked
java.lang.Exception
- Indicates an error while iterating and executing the
algorithmpublic void onCheckAll(ControlRequestContext ctx, SelectMode mode, boolean check) throws java.lang.Exception
onCheckAll
in class ListControl
ctx
- ControlRequestContextmode
- SelectModecheck
- true if checked
java.lang.Exception
- Indicates an error while iterating and executing the
algorithmpublic void onCheckColumn(ControlRequestContext ctx, java.lang.String column, boolean check) throws java.lang.Exception
onCheckColumn
in class ListControl
ctx
- ControlRequestContextcolumn
- the columncheck
- true if checked
java.lang.Exception
- Indicates an error while iterating and executing the
algorithmpublic void onSort(ControlRequestContext ctx, java.lang.String column, SortOrder direction) throws java.lang.Exception
onSort
in class ListControl
ctx
- ControlRequestContextcolumn
- Name of the Columndirection
- SortOrder
java.lang.Exception
- is thrown when an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |