public class TableAdapter extends java.lang.Object implements Table
Table.ToolbarShape
Modifier and Type | Field and Description |
---|---|
protected boolean |
asc |
protected java.util.List<ColumnDescription> |
columns |
protected java.lang.String |
defaultAction |
protected java.lang.String |
editTarget |
protected java.lang.String |
editTargetProps |
protected java.lang.String |
editUrl |
protected java.lang.String |
fieldname |
protected java.lang.String |
helpctx |
protected java.lang.String |
id |
protected javax.swing.table.TableModel |
model |
protected boolean |
oidOnly |
protected Page |
page |
protected java.lang.String |
pageString |
protected javax.servlet.http.HttpServletRequest |
request
The HTTP request is set in the init method
|
protected Resource |
resource |
protected java.lang.String |
searchString |
protected java.util.List<java.lang.String> |
selected |
protected int |
selection |
protected boolean |
showCounter |
protected boolean |
sortable |
protected int |
sortColumn |
protected java.lang.String |
tableTarget |
protected java.lang.String |
title |
protected java.lang.String |
toolbarActions |
protected boolean |
toolbarIcons |
protected Table.ToolbarShape |
toolbarShape |
protected java.lang.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(javax.swing.table.TableModel m,
java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ColumnDescription> |
getColumns()
Return a list of column descriptions.
|
java.lang.String |
getDefaultAction()
Returns the action that is executed on doubleclick on a row.
|
java.lang.String |
getEditTarget()
The default target for toolbar functions
|
java.lang.String |
getEditTargetProps()
Return the window properties for the edit target
|
java.lang.String |
getEditUrl()
Returns an url used as link for toolbar functions
|
java.lang.String |
getFieldName()
Return the name of the checkbox or radio buttons
|
java.lang.String |
getFilterId()
Returns the id that is used when column filters are stored.
|
java.lang.String |
getHelpContext()
Returns the context for online-help
|
java.lang.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.
|
java.util.List<java.lang.String> |
getSelectedItems() |
int |
getSelectionMode()
Return the mode for selection.
|
int |
getSortColumn()
Return the sort column.
|
java.lang.String |
getTableFrameName()
Returns the name of the frame where the table resides.
|
javax.swing.table.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.
|
java.lang.Object |
getTitle()
Return a string or Component for table title
|
java.lang.String |
getToolbarActions()
Return a comma separated list of action ids for the toolbar.
|
java.lang.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(javax.servlet.http.HttpServletRequest req)
Init the tablemodel (determine data to be displayed).
|
boolean |
isSortable()
Is the table sortable.
|
java.lang.String |
lineStyle(int i,
java.lang.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(java.lang.String select,
int defaultValue) |
TableAdapter |
setColumns(java.util.List<ColumnDescription> cols,
boolean useFilter,
boolean useColumnPicker)
Set the column properties.
|
TableAdapter |
setDefaultAction(java.lang.String action)
Set the default action.
|
TableAdapter |
setEditProps(java.lang.String editUrl,
java.lang.String editTarget,
java.lang.String winProps,
java.lang.String toolbarActions,
java.lang.String toolbarTarget)
Set the edit properties.
|
TableAdapter |
setHelpContext(java.lang.String ctx)
Set the help context for online help.
|
void |
setPage(Page page) |
void |
setPage(java.lang.String pageString) |
void |
setSearchString(java.lang.String searchString)
Sets the search string for that table which may be used for filtering the table content
|
TableAdapter |
setSelection(int selection,
java.lang.String fieldname,
boolean oidOnly,
java.util.List<java.lang.String> selected)
Set the selection properties.
|
TableAdapter |
setSortable(boolean isSortable,
int col,
boolean asc)
Set the sort properties.
|
TableAdapter |
setTitle(java.lang.String title)
Set the title of the table.
|
void |
setToolbarShape(java.lang.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 javax.servlet.http.HttpServletRequest request
protected javax.swing.table.TableModel model
protected java.lang.String id
protected java.lang.String title
protected Resource resource
protected boolean sortable
protected int sortColumn
protected boolean asc
protected int selection
protected java.util.List<java.lang.String> selected
protected java.lang.String fieldname
protected boolean oidOnly
protected java.lang.String editUrl
protected java.lang.String editTarget
protected java.lang.String editTargetProps
protected java.lang.String toolbarActions
protected java.lang.String toolbarTarget
protected java.lang.String tableTarget
protected boolean verticalToolbar
protected boolean toolbarIcons
protected Table.ToolbarShape toolbarShape
protected java.lang.String defaultAction
protected boolean showCounter
protected java.util.List<ColumnDescription> columns
protected boolean useFilter
protected boolean useColumnPicker
protected boolean usePaging
protected java.lang.String searchString
protected java.lang.String pageString
protected Page page
protected java.lang.String helpctx
public TableAdapter()
public TableAdapter(javax.swing.table.TableModel m, java.lang.String id)
public void init(javax.servlet.http.HttpServletRequest req)
public void setSearchString(java.lang.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 javax.swing.table.TableModel getTableModel()
getTableModel
in interface Table
public java.lang.Object getTitle()
public java.lang.String getId()
public Page getPage()
public void setPage(java.lang.String pageString)
public void setPage(Page page)
public java.lang.String lineStyle(int i, java.lang.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 java.lang.String getFieldName()
getFieldName
in interface Table
public boolean oidOnly()
public java.lang.String getEditUrl()
getEditUrl
in interface Table
public java.lang.String getEditTarget()
getEditTarget
in interface Table
public java.lang.String getEditTargetProps()
getEditTargetProps
in interface Table
public java.lang.String getToolbarActions()
getToolbarActions
in interface Table
public java.lang.String getTableFrameName()
getTableFrameName
in interface Table
public java.lang.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(java.lang.String s)
public java.lang.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 java.util.List<ColumnDescription> getColumns()
getColumns
in interface Table
public java.lang.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, java.lang.String fieldname, boolean oidOnly, java.util.List<java.lang.String> selected)
selection
- see Table.getSelectionMode()
for valuesfieldname
- see Table.getFieldName()()
oidOnly
- see Table.oidOnly()
selected
- a list of already selected valuespublic TableAdapter setEditProps(java.lang.String editUrl, java.lang.String editTarget, java.lang.String winProps, java.lang.String toolbarActions, java.lang.String toolbarTarget)
editUrl
- editTarget
- winProps
- toolbarActions
- toolbarTarget
- public TableAdapter setHelpContext(java.lang.String ctx)
ctx
- public TableAdapter showCounter(boolean show)
show
- true if a counter is wanted.public TableAdapter setTitle(java.lang.String title)
public TableAdapter setColumns(java.util.List<ColumnDescription> cols, boolean useFilter, boolean useColumnPicker)
cols
- useFilter
- useColumnPicker
- public TableAdapter setDefaultAction(java.lang.String action)
public java.util.List<java.lang.String> getSelectedItems()
getSelectedItems
in interface Table
public java.lang.String getHelpContext()
getHelpContext
in interface Table
public int getPagesize()
getPagesize
in interface Table
public void parseSelection(java.lang.String select, int defaultValue)
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.