public class TableAdapter extends Object implements Table
Table.ToolbarShape
Modifier and Type | Field and Description |
---|---|
protected boolean |
asc |
protected List<ColumnDescription> |
columns |
protected String |
defaultAction |
protected String |
editTarget |
protected String |
editTargetProps |
protected String |
editUrl |
protected String |
fieldname |
protected String |
helpctx |
protected String |
id |
protected TableModel |
model |
protected boolean |
oidOnly |
protected Page |
page |
protected String |
pageString |
protected HttpServletRequest |
request
The HTTP request is set in the init method
|
protected Resource |
resource |
protected String |
searchString |
protected List<String> |
selected |
protected int |
selection |
protected boolean |
showCounter |
protected boolean |
sortable |
protected int |
sortColumn |
protected String |
tableTarget |
protected String |
title |
protected String |
toolbarActions |
protected boolean |
toolbarIcons |
protected Table.ToolbarShape |
toolbarShape |
protected String |
toolbarTarget |
protected boolean |
useColumnPicker |
protected boolean |
useFilter |
protected boolean |
usePaging |
protected boolean |
verticalToolbar |
SELECTION_HIDDEN, SELECTION_LINK, SELECTION_MULTIPLE, SELECTION_NONE, SELECTION_ROW_MULTIPLE, SELECTION_ROW_SINGLE, SELECTION_SINGLE
Constructor and Description |
---|
TableAdapter() |
TableAdapter(TableModel m,
String id) |
Modifier and Type | Method and Description |
---|---|
List<ColumnDescription> |
getColumns()
Return a list of column descriptions.
|
String |
getDefaultAction()
Returns the action that is executed on doubleclick on a row.
|
String |
getEditTarget()
The default target for toolbar functions
|
String |
getEditTargetProps()
Return the window properties for the edit target
|
String |
getEditUrl()
Returns an url used as link for toolbar functions
|
String |
getFieldName()
Return the name of the checkbox or radio buttons
|
String |
getFilterId()
Returns the id that is used when column filters are stored.
|
String |
getHelpContext()
Returns the context for online-help
|
String |
getId()
Returns the id of this table
|
Page |
getPage()
Define the page the table uses.
|
int |
getPagesize()
The default implementation reads the table.pagesize property as default and the user property avw.table.pagesize.
|
List<String> |
getSelectedItems() |
int |
getSelectionMode()
Return the mode for selection.
|
int |
getSortColumn()
Return the sort column.
|
String |
getTableFrameName()
Returns the name of the frame where the table resides.
|
TableModel |
getTableModel()
Builds the final tablemodel containing all data displayed in the table.
|
int |
getTableSize()
Determines the tablesize of the tablemodel without reading all the objects.
|
Object |
getTitle()
Return a string or Component for table title
|
String |
getToolbarActions()
Return a comma separated list of action ids for the toolbar.
|
String |
getToolbarFrameName()
Returns the name of the frame where the toolbar resides.
|
Table.ToolbarShape |
getToolbarShape()
Returns the desired mode of the toolbar.
|
boolean |
hasVerticalToolbar()
Returns true if the toolbar is vertical, false for horizontal.
|
void |
init(HttpServletRequest req)
Init the tablemodel (determine data to be displayed).
|
boolean |
isSortable()
Is the table sortable.
|
String |
lineStyle(int i,
String style)
Use this method for defining a row specific css-class.
|
boolean |
oidOnly()
If true the value of the checkbox or radio button contains only the oid, otherwise it
contains classname:oid
|
void |
parseSelection(String select,
int defaultValue) |
TableAdapter |
setColumns(List<ColumnDescription> cols,
boolean useFilter,
boolean useColumnPicker)
Set the column properties.
|
TableAdapter |
setDefaultAction(String action)
Set the default action.
|
TableAdapter |
setEditProps(String editUrl,
String editTarget,
String winProps,
String toolbarActions,
String toolbarTarget)
Set the edit properties.
|
TableAdapter |
setHelpContext(String ctx)
Set the help context for online help.
|
void |
setPage(Page page) |
void |
setPage(String pageString) |
void |
setSearchString(String searchString)
Sets the search string for that table which may be used for filtering the table content
|
TableAdapter |
setSelection(int selection,
String fieldname,
boolean oidOnly,
List<String> selected)
Set the selection properties.
|
TableAdapter |
setSortable(boolean isSortable,
int col,
boolean asc)
Set the sort properties.
|
TableAdapter |
setTitle(String title)
Set the title of the table.
|
void |
setToolbarShape(String s) |
boolean |
showCounter()
Returns true if a counter is shown below the table.
|
TableAdapter |
showCounter(boolean show)
Define whether a counter should be shown.
|
boolean |
showToolbarIcons()
Deprecated.
|
boolean |
sortAscending()
Is the table sorted ascending.
|
boolean |
useColumnPicker()
Returns true if column picker should be shown.
|
boolean |
useFilter()
Returns true if column filters are enabled.
|
boolean |
usePaging()
Returns true if paging is enabled.
|
protected HttpServletRequest request
protected TableModel model
protected String id
protected String title
protected Resource resource
protected boolean sortable
protected int sortColumn
protected boolean asc
protected int selection
protected String fieldname
protected boolean oidOnly
protected String editUrl
protected String editTarget
protected String editTargetProps
protected String toolbarActions
protected String toolbarTarget
protected String tableTarget
protected boolean verticalToolbar
protected boolean toolbarIcons
protected Table.ToolbarShape toolbarShape
protected String defaultAction
protected boolean showCounter
protected List<ColumnDescription> columns
protected boolean useFilter
protected boolean useColumnPicker
protected boolean usePaging
protected String searchString
protected String pageString
protected Page page
protected String helpctx
public TableAdapter()
public TableAdapter(TableModel m, String id)
public void init(HttpServletRequest req)
public void setSearchString(String searchString)
setSearchString
in interface Table
searchString
- a string for filtering or null if no search string is definedpublic int getTableSize()
getTableSize
in interface Table
public TableModel getTableModel()
getTableModel
in interface Table
public Object getTitle()
public Page getPage()
public void setPage(String pageString)
public void setPage(Page page)
public String lineStyle(int i, String style)
public boolean isSortable()
isSortable
in interface Table
public boolean sortAscending()
sortAscending
in interface Table
public int getSortColumn()
getSortColumn
in interface Table
public int getSelectionMode()
getSelectionMode
in interface Table
public String getFieldName()
getFieldName
in interface Table
public boolean oidOnly()
public String getEditUrl()
getEditUrl
in interface Table
public String getEditTarget()
getEditTarget
in interface Table
public String getEditTargetProps()
getEditTargetProps
in interface Table
public String getToolbarActions()
getToolbarActions
in interface Table
public String getTableFrameName()
getTableFrameName
in interface Table
public String getToolbarFrameName()
getToolbarFrameName
in interface Table
public boolean hasVerticalToolbar()
hasVerticalToolbar
in interface Table
@Deprecated public boolean showToolbarIcons()
showToolbarIcons
in interface Table
public Table.ToolbarShape getToolbarShape()
Table
getToolbarShape
in interface Table
public void setToolbarShape(String s)
public String getDefaultAction()
Table.getToolbarActions()
for a description of allowed valuesgetDefaultAction
in interface Table
public boolean useFilter()
public boolean useColumnPicker()
useColumnPicker
in interface Table
public boolean usePaging()
public boolean showCounter()
showCounter
in interface Table
public List<ColumnDescription> getColumns()
getColumns
in interface Table
public String getFilterId()
Table
getFilterId
in interface Table
public TableAdapter setSortable(boolean isSortable, int col, boolean asc)
isSortable
- true if sortable.col
- the sort columnasc
- the sort order (true = ascending)public TableAdapter setSelection(int selection, String fieldname, boolean oidOnly, List<String> selected)
selection
- see Table.getSelectionMode()
for valuesfieldname
- see Table.getFieldName()
oidOnly
- see Table.oidOnly()
selected
- a list of already selected valuespublic TableAdapter setEditProps(String editUrl, String editTarget, String winProps, String toolbarActions, String toolbarTarget)
editUrl
- editTarget
- winProps
- toolbarActions
- toolbarTarget
- public TableAdapter setHelpContext(String ctx)
ctx
- public TableAdapter showCounter(boolean show)
show
- true if a counter is wanted.public TableAdapter setTitle(String title)
public TableAdapter setColumns(List<ColumnDescription> cols, boolean useFilter, boolean useColumnPicker)
cols
- useFilter
- useColumnPicker
- public TableAdapter setDefaultAction(String action)
public List<String> getSelectedItems()
getSelectedItems
in interface Table
public String getHelpContext()
getHelpContext
in interface Table
public int getPagesize()
getPagesize
in interface Table
public void parseSelection(String select, int defaultValue)
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.