 |
Control API for Table View (tableView)
Arrangement of data - text, images, links, other tables etc. - into rows
and columns of cells. TableView rows may be grouped into a head, foot
and body section. The tableView supplies also navigation buttons which
allow browsing thru the table.

- design
Defines the look of the table
- ALTERNATING
The rows of the table entries are colored alternating.
- STANDARD
The background of tableView is uniformly colored.
- TRANSPARENT
The tableView has no background.
- fillUpEmptyRows
A boolean value. If set to "TRUE"
the tableView has always the height set by the 'visibleRowCount' attribute,
regardless of the available table entries. The not available table entries
will be filled up with empty lines and according the 'design' attribute.
If set to "FALSE" the tableView height is adjusted to the
available table entries.
- footerVisible
A boolean value that controls the
footer row. If set to "FALSE" the footer row including the
navigation buttons is invisible.
- headerText
Defines the headline of the tableView.
- headerVisible
A boolean value that controls the
header line. If set to "FALSE" the header row is invisible.
- id
Identification name of the tableView.
- model
Defines the model which provides the tableView with data.
- navigationMode
Controls the navigation buttons in the footer row.
- BYPAGE
Four navigation buttons are displayed that allow browsing page up,
page down, first and last table entry
- BYLINE
Two additional buttons are displayed allowing single row up and
down.
- onCellClick
Defines the action that will be processed
when the user clicks on one cell of a column.
- onHeaderClick
Defines the action that will be processed
when the user clicks on the header of the table.
- onNavigate
Defines the action that will be processed
when the user clicks on the navigation buttons.
- onRowSelection
Defines the action that will be processed
when the user clicks on the radiobutton button in the first column.
The radiobutton is visible when the 'selectionMode' is set to "SINGLESELECT".
The method com.sapportals.htmlb.event.TableSelectionEvent.getRowIndex()
can be used to retrieve the index of the row that initiated the event.
- rowCount
Defines the maximum record that
is displayed together with the actual position (e.g. 3/16 - meaning:
actual position 3, maximum records 16) on the right side of the footer.
If 'rowCount' is not specified the number of records in the model define
the value.
- selectionMode
Defines how the table entries can be selected
- MULTISELECT
A checkbox is displayed on every row at the first column of the
table. According to the nature of the checkbox multiple columns
can be selected at a time.
- NONE
No selection possible (no checkbox and no radiobutton).
- SINGLESELECT
A radiobutton is displayed on every row at the first column of the
table. According to the nature of the radiobutton one column can
be selected at a time. Together with this attribute 'onRowSelection'
attribute can be set so that an event is fired, when the user clicks
on the radiobutton.
- visibleFirstRow
Defines the number of the table entry
that is displayed in the first row of the tableView. All subsequent
entry are displayed accordingly.
- visibleRowCount
Defines the visible rows of the tableView. If 'fillUpEmptyRows'
is set to "TRUE", all rows specified with 'visibleRowCount'
are displayed. The default for 'visibleRowCount' is the number of table
entries supplied by the model.
- width
Defines the width of tableView
| attribute |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| design |
no |
STANDARD
ALTERNATING
TRANSPARENT |
STANDARD |
yes |
design="ALTERNATING" |
setDesign
(TableViewDesign.ALTERNATING) |
| fillUpEmptyRows |
no |
FALSE
TRUE |
TRUE |
yes |
fillUpEmptyRows="FALSE" |
setFillUpEmptyRows(false) |
| footerVisible |
no |
FALSE
TRUE |
TRUE |
yes |
footerVisible="FALSE" |
setFooterVisible(false) |
| headerText |
no |
String |
TRUE |
no |
headerText="SAP
training" |
setHeaderText("SAP
training") |
| headerVisible |
no |
FALSE
TRUE |
TRUE |
yes |
headerVisible("FALSE") |
setHeaderVisible(false) |
| id |
yes |
String |
none |
yes |
id="Trainingscenter" |
|
| model |
no |
String |
none |
no |
model="myBean.model" |
setModel((TableViewModel) model) |
| navigationMode |
no |
BYPAGE
BYLINE |
BYPAGE |
yes |
navigationMode="BYLINE" |
setNavigationMode
(TableNavigationMode.BYLINE) |
| rowCount |
no |
Numeric |
defined by model |
- |
rowCount="5" |
setRowCount(5) |
| selectionMode |
no |
MULTISELECT
NONE
SINGLESELECT |
MULTISELECT |
yes |
selectionMode="NONE" |
setSelectionMode
(TableSelectionMode.NONE) |
| visibleFirstRow |
no |
Numeric |
1 |
- |
visibleFirstRow="5" |
setVisibleFirstRow(5) |
| visibleRowCount |
no |
String |
defined by model |
- |
visibleRowCount="20" |
setVisibleRowCount(20) |
| width |
no |
Unit |
none |
- |
width="500" |
setWidth("500") |
| events |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| onCellClick |
no |
String |
none |
yes |
|
setOnCellClick("Pr_Cell") |
| onHeaderClick |
no |
String |
none |
yes |
|
setOnHeaderClick("Pr_Header") |
| onNavigate |
no |
String |
none |
yes |
onNavigate="Pr_NavClick" |
setOnNavigate("Pr_NavClick") |
| onRowSelection |
no |
String |
none |
yes |
|
setOnRowSelection("Pr_Row") |
Example
<hbj:tableView
id="myTableView1"
model="myTableViewBean.model"
design="ALTERNATING"
headerVisible="true"
footerVisible="true"
fillUpEmptyRows="true"
navigationMode="BYLINE"
selectionMode="MULTISELECT"
headerText="TableView example 1"
onNavigate="myOnNavigate"
visibleFirstRow="1"
visibleRowCount="5"
rowCount="16"
width="500 px"
/>
Result
|
|