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)
Method name |
Return type |
Available since |
addColumn(int) |
void |
|
Overview
addRow(int)
Method name |
Return type |
Available since |
addRow(int) |
void |
|
Overview
compareTo(Comparable)
Method name |
Return type |
Available since |
compareTo(Comparable) |
int |
|
Overview
deleteColumn(int)
Method name |
Return type |
Available since |
deleteColumn(int) |
void |
|
Overview
deleteRow(int)
Method name |
Return type |
Available since |
deleteRow(int) |
void |
|
Overview
diff(Element)
Method name |
Return type |
Available since |
diff(Element) |
Element |
|
Overview
equals(Object)
Method name |
Return type |
Available since |
equals(Object) |
boolean |
|
Overview
getCell(int, int)
Method name |
Return type |
Available since |
getCell(int, int) |
TableCell |
|
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 |
|
Overview
getDom
Method name |
Return type |
Available since |
getDom |
Element |
|
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 |
|
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 |
|
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
Method name |
Return type |
Available since |
print |
void |
|
Overview
replace(Table)
Method name |
Return type |
Available since |
replace(Table) |
void |
|
Overview
set(String, Object)
Method name |
Return type |
Available since |
set(String, Object) |
Object |
|
Overview
toJson
Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings)
Method name |
Return type |
Available since |
toJson |
String |
4.2.14 |
Overview
toString
Method name |
Return type |
Available since |
toString |
String |
|
Overview
type
Method name |
Return type |
Available since |
type |
String |
|
Overview