Value range of the Table data type
In FirstSpirit it is possible to enter data in tabular form. Such data is usually stored structured in XML markup language. This is necessary as (in addition to the rows and cells) several contents must contain special markups, highlighting and information for specific parts.
In order to be able to output or further process the contents stored in this way, these input components return an object of the data type Table .
Definition using the standard input components
Different input components can be defined in the form area of a page or section template. These form elements can then be used to insert the actual editorial contents into the page. The Standard input components supported by FirstSpirit return different data types.
The following standard input components return an object of data type Table :
Then, with the help of a $CMS_VALUE(...)$ instruction, methods can then be applied to this object:
$CMS_VALUE(IDENTIFIER.METHOD)$
Under IDENTIFIER, the resultname parameter, defined in the input component, must be specified.
Methods on Table objects
The table below lists all methods which can be invoked on objects of data type Table.
addColumn(int)
Adds a new column at the specified index.
Method name |
Return type |
Available since |
addColumn(int) |
void |
4.0.17 |
Overview
addRow(int)
Adds a new row at the specified index.
Method name |
Return type |
Available since |
addRow(int) |
void |
4.0.17 |
Overview
deleteColumn(int)
Deletes the column with the specified index
Method name |
Return type |
Available since |
deleteColumn(int) |
void |
4.0.17 |
Overview
deleteRow(int)
Deletes the row with the specified index
Method name |
Return type |
Available since |
deleteRow(int) |
void |
4.0.17 |
Overview
diff(Element)
Compute a difference between this element and the given one.
Method name |
Return type |
Available since |
diff(Element) |
Element |
4.0.59 |
Overview
equals(Object)
Method name |
Return type |
Available since |
equals(Object) |
boolean |
|
Overview
getCell(int, int)
Gets the cell of this table with the given row & col index or null if no cell exists with these indices.
Method name |
Return type |
Available since |
getCell(int, int) |
TableCell |
4.0.17 |
Overview
getClass
The .getClass() (in Bean syntax: .class) method returns the class of the invoking object (cf. java.lang.Class).
Invocation:
$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$
Output:
java.lang.String
Method name |
Return type |
Available since |
getClass |
Class |
|
Overview
getColumns
The .getColumns() (in Bean syntax: .columns) method returns the number of columns in a table.
The returned object is an integer (see java.lang.Integer).
Method name |
Return type |
Available since |
getColumns |
int |
4.0.17 |
Overview
getDom
Returns the element node of this table.
Method name |
Return type |
Available since |
getDom |
Element |
4.0.17 |
Overview
getRows
The .getRows() (in Bean syntax: .rows) method returns the number of rows in a table.
The returned object is an integer (see java.lang.Integer).
Method name |
Return type |
Available since |
getRows |
int |
4.0.17 |
Overview
isCase(Object)
Method name |
Return type |
Available since |
isCase(Object) |
boolean |
|
Overview
isEmpty
The .isEmpty() (in Bean syntax: .isEmpty) method checks whether an expression or object is empty, e.g. storeElement.isEmpty(). The result of the semantic check depends on the expression or object, e.g. a character string is empty if it does not contain any characters. In the case of objects with complex values or objects, the object decides when it is empty. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isEmpty() returns a Boolean value as the check result. true is the check result if the expression or object is empty and false if not.
Method name |
Return type |
Available since |
isEmpty |
boolean |
4.0.17 |
Overview
isNull
The .isNull() (in Bean syntax: .isNull) method checks whether an expression or object is null , e.g. storeElement.isNull(). In the case of objects with complex values or objects, the object decides when it is null. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isNull() returns a Boolean value as the check result. true is the check result if the expression or object is null and false if not.
Method name |
Return type |
Available since |
isNull |
boolean |
|
Overview
print
default print behaviour of a dom table: print all contained rows and cells
Method name |
Return type |
Available since |
print |
void |
4.0.0 |
Overview
replace(Table)
Replaces this table with the given table.
Method name |
Return type |
Available since |
replace(Table) |
void |
4.0.36 |
Overview
set(String, Object)
Method name |
Return type |
Available since |
set(String, Object) |
Object |
|
Overview
toJSON
Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value.
Method name |
Return type |
Available since |
toJSON |
String |
5.2.11 |
Overview
toString
Method name |
Return type |
Available since |
toString |
String |
|
Overview
type
Method name |
Return type |
Available since |
type |
String |
|
Overview