|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.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 ControlControl.getDataModel()public void setDataModel(ListDataModel dataModel)
dataModel - DataModel
public 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 ControlControl.getDesignModel()public void setDesignModel(ListDesignModel designModel)
designModel - ListDesignModelpublic StateModel getStateModel()
Control
getStateModel in class ControlControl.getStateModel()public void setStateModel(ListStateModel stateModel)
stateModel - ListStateModelpublic int getPageButtons()
ListControl
getPageButtons in class ListControlListControl.getPageButtons()public boolean showFrame()
ListControl
showFrame in class ListControlListControl.showFrame()public boolean showHeader()
ListControl
showHeader in class ListControlListControl.showHeader()public int getCellPadding()
ListControl
getCellPadding in class ListControlListControl.getCellPadding()public int getCellSpacing()
ListControl
getCellSpacing in class ListControlListControl.getCellSpacing()public OrientationType getTabOrientation()
ListControl
getTabOrientation in class ListControlListControl.getTabOrientation()public boolean showButton(ControlButton button)
Control
showButton in class Controlbutton - ControlButton
Control.showButton(com.cc.framework.ui.control.ControlButton)public ColumnDesignModel[] getColumns()
ListControl
getColumns in class ListControlListControl.getColumns()public LineIterator getLineIterator(boolean positioned)
ListControl
getLineIterator in class ListControlpositioned - 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 ListControlListControl.getPageLineIterator()public InnerFrame[] getInnerFrames(java.lang.Object layoutHint)
getInnerFrames in class ListControllayoutHint - The layout hint that specifies what frames should be selected:
public int getCurrentPage()
ListStateModel
getCurrentPage in interface ListStateModelgetCurrentPage in class ListControlListControl.getCurrentPage()public void setCurrentPage(int page)
ListStateModel
setCurrentPage in interface ListStateModelpage - The new page indexListStateModel.setCurrentPage(int)public java.lang.String getSortColumn()
ListStateModel
getSortColumn in interface ListStateModelListStateModel.getSortColumn()public SortOrder getSortOrder()
ListStateModel
getSortOrder in interface ListStateModelListStateModel.getSortOrder()public SortOrder getSortOrder(java.lang.String column)
ListControl
getSortOrder in class ListControlcolumn - The name of the column
ListControl.getSortOrder(java.lang.String)
public void setSortInfo(java.lang.String column,
SortOrder direction)
setSortInfo in interface ListStateModelcolumn - Name of the columndirection - The sort orderpublic void resetSortInfo()
ListStateModel
resetSortInfo in interface ListStateModelListStateModel.resetSortInfo()public void reset()
StateModel
reset in interface StateModelStateModel.reset()public int getRowsPerPage()
ListControl
getRowsPerPage in class ListControlListControl.getRowsPerPage()public int getMinRowCount()
ListControl
getMinRowCount in class ListControlListControl.getMinRowCount()public int getTotalRowCount()
getTotalRowCount in class ListControlpublic int getTotalPages()
ListControl
getTotalPages in class ListControlListControl.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 ListControlListControl.getTitle()public java.lang.String[] getDetailText()
ListControl
getDetailText in class ListControlListControl.getDetailText()public ImageModel getImage()
ListControl
getImage in class ListControlListControl.getImage()public java.lang.String getEmptyText()
ListControl
getEmptyText in class ListControlListControl.getEmptyText()public SelectMode getSelectMode()
ListControl
getSelectMode in class ListControlListControl.getSelectMode()public java.lang.String getScrollHeight()
ListControl
getScrollHeight in class ListControlListControl.getScrollHeight()public boolean isFirstPage()
public boolean isLastPage()
public java.lang.Object getRowFromKey(java.lang.String rowkey)
ListControl
getRowFromKey in class ListControlrowkey - The rows unique key
nullListControl.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 ListControlctx - 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 set
protected 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 ListControlctx - 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 ListStateModeluniqueKey - The unique key
ListStateModel.isMarked(java.lang.String)public java.lang.String[] getMarked()
ListStateModel
getMarked in interface ListStateModelListStateModel.getMarked()public void mark(java.lang.String uniqueKey)
ListStateModel
mark in interface ListStateModeluniqueKey - 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 ListStateModeluniqueKey - The unique key of the row which should be unselectedListStateModel.unmark(java.lang.String)public void unmarkAll()
ListStateModel
unmarkAll in interface ListStateModelListStateModel.unmarkAll()
public void onPage(ControlRequestContext ctx,
int newPage)
throws java.lang.Exception
onPage in class ListControlctx - ControlRequestContextnewPage - Number of the new Page
java.lang.Exception - is thrown when an error occurs
public void onCheck(ControlRequestContext ctx,
java.lang.String key,
SelectMode mode,
boolean check)
throws java.lang.Exception
onCheck in class ListControlctx - 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
algorithm
public void onCheckAll(ControlRequestContext ctx,
SelectMode mode,
boolean check)
throws java.lang.Exception
onCheckAll in class ListControlctx - ControlRequestContextmode - SelectModecheck - true if checked
java.lang.Exception - Indicates an error while iterating and executing the
algorithm
public void onCheckColumn(ControlRequestContext ctx,
java.lang.String column,
boolean check)
throws java.lang.Exception
onCheckColumn in class ListControlctx - ControlRequestContextcolumn - the columncheck - true if checked
java.lang.Exception - Indicates an error while iterating and executing the
algorithm
public void onSort(ControlRequestContext ctx,
java.lang.String column,
SortOrder direction)
throws java.lang.Exception
onSort in class ListControlctx - 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 | ||||||||||