Start page
Start page

Start page / Template development / Template syntax / System objects / #row

#rowAvailable from FirstSpirit Version 4.0

The system object: #row is available in a data source based section or in the corresponding table template.

#row represents the currently generated data record.

Methods can be applied on the system object and column or attribute values can also be output.

The general syntax of #row is:

$CMS_VALUE(#row.METHOD)$

and/or

$CMS_VALUE(#row.ATTRIBUTE[.ATTRIBUTE[.ATTRIBUTE...]])$

#row returns an object of the data type Entity .

Important The Bean syntax should not be used in the method invocations of the system object: #row as it can result in overlapping with the names of the columns! The method invocations should always be specified in detail in this position, i.e. with .get and ().

Methods of #row

The general methods are listed in the following table:

Invocation

Meaning

Return data type

#row.getAttributeNames()

Returns the names of all attributes of a data record (e.g. column name, name of a foreign key relation, etc.).

Collection<String>

#row.getEditor()

Returns the last editor of the data record.

User

#row.getEditor().abbreviation

Returns the abbreviation of the last editor of the data record.

String
(character string)

#row.getEditor().eMail

Returns the eMail address of the last editor of the data record.

String
(character string)

#row.getEditor().phoneNumber

Returns the phone number of the last editor of the data record.

String
(character string)

#row.getEditor().realname

Returns the name of the last editor of the data record.

String
(character string)

#row.getEntityType().name

Returns the name of the table in the schema.

String
(character string)

#row.getId()

Returns the value of the fs_id column. This value is the consecutive ID of a data record in the corresponding table.

Integer

#row.getLastChange()

Returns the date of the last change to a data record.

Date

#row.getReleasedBy()

Returns the editor who released the data record.

User

#row.getReleasedBy().abbreviation

Returns the abbreviation of the editor who released the data record.

String
(character string)

#row.getReleasedBy().eMail

Returns the eMail address of the editor who released the data record.

String
(character string)

#row.getReleasedBy().phoneNumber

Returns the phone number of the editor who released the data record.

String
(character string)

#row.getReleasedBy().realname

Returns the name of the editor who released the data record.

String
(character string)

#row.getValue("IDENTIFIER")

Returns the value of a column. The complete name of the column in the schema must be given as the identifier.

Column-dependent, e.g.
Boolean,
String,
etc.

#row.isReleased()

Determines whether a data record is released or not.

Boolean
(Boolean value)

   

Attributes and #row

In addition to the method invocations, behind the point for a #row object the column name or the name of the foreign key relationship can also be given.

$CMS_VALUE(#row.text)$
$CMS_VALUE(#row.text_DE)$
$CMS_VALUE(#row.address.postcode)$

Unlike the invocation: #global.getValue("...") the complete name of the column does not have to be given. It suffices to specify the part before the language extension (e.g. _DE). The language extension is automatically formed from the language for the preview.

On evaluating the expression the program first tries to find a column with the automatically determined language extension. If no column is found it tries to find the column without language extension.

Example:

A column with the name text_EN was defined in the schema. The following expression is used in the table template:

$CMS_VALUE(#row.text)$

For the preview, in the language with the abbreviation EN, the program now first tries to find a column with the name text_EN and then with the name text .

The result is the return of the value of the column found (in the example the value of the column: text_EN).

Alternatively, the value can also be determined using the .getValue(...) method.

The expression for language-independent identification of the column is:

$CMS_VALUE(#global.getValue("IDENTIFIER"))$

For language-dependent identification of the column:

$CMS_VALUE(#global.getValue("IDENTIFIER_" + #global.language.abbreviation))$

Referring to the example, the equivalent to $CMS_VALUE(#global.text)$:

$CMS_VALUE(#global.getValue("text_" + #global.language.abbreviation))$

© 2005 - 2014 e-Spirit AG | All rights reserved. | Last change: 2013-11-11