Scout/Concepts/Column
Scout |
Wiki Home |
Website |
Download • Git |
Community |
Forums • Blog • Twitter • G+ |
Bugzilla |
Bugzilla |
Columns describe the structure of a Table
Description
A column is the entity of a table describing the structure of the data displayed in the table. Depending on the type of values contained in the column, one of the child implementation specialized for the given type should be considered.
ColumnSet
Type of column
- String Column
- Integer Column
- Long Column
- Double Column
- Date Column
- Time Column
- Boolean Column
- Smart Column <T>
Accessing the values
Columns are typed. They allow getting the value they contain for a specific row. The getValue(row)
is also typed:
getTable().getNameColumn().getValue(row); //returns a String if NameColumn is a StringColumn.
This way is better than the un-typed getValue() proposed by the table row:
row.getCell(getTable().getNameColumn()).getValue(); //returns Object
There are other convenience methods:
-
getSelectedValue()
returning the value for column of the selected row -
getSelectedValues()
same function but useful if the table allows multiple rows selection. -
getValues(rows)
the function takes as input an array of rows and return their values.
Properties
Defined with getConfiguredXxxxxx() methods.
Displayable Only displayable columns can be displayed in the table. Not displayable columns are suitable for values that you need to have for each row (typically an unique id that you need to pass to a form that is opened when you edit the entity represented in the row).
Visible A column can be visible or not. The default behavior of a table lets the user configure the columns he want to display in a table.
Summary Defines that the column will contribute its text to the summary cell.
Primary TODO
Sorting properties
- ... TODO
- ...
- ...
Events
Defined with execXxxxxx() methods.