Start page
Start page
Start page

Start page / Template development / Template syntax / Data types / SectionList

SectionList data type Available from FirstSpirit Version 4.0

Value range of the SectionList data type

In FIRSTspirit, sections can be created in the Page Store and filled with content. In addition the CONTENTAREALIST input content enables sections to be maintained.

A section in the Page Store returns an object of the data type Section .

The special feature of a CONTENTAREALIST is that it returns a list (SectionList) of Section objects, which can be output with the help of a $CMS_FOR(...)$ instruction.

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 SectionList :

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 SectionList objects

The table below lists all methods which can be invoked on objects of data type SectionList .

The object is generated by the following form objects:
CMS_INPUT_CONTENTAREALIST
Method name Return type Brief description Available since
add(List) List
add(Object) boolean
add(int, Object) void
addAll(Collection) boolean
addAll(int, Collection) boolean
clear void
compareTo(Comparable) int
contains(Object) boolean
containsAll(Collection) boolean checks if all elements of the provided element are contained 4.0.0
copy Collection make a (shallow) copy 4.0.0
create(String, SectionTemplate) Section
createAll(Iterable) void
diff(SectionList) List
distinct(Lambda) Collection filters a collection and returns only the first occurrence relating to a lambda expression 4.1
equals(Object) boolean
fetch(Long) Section
filter(String) Object delivers a filtered collection, the last parameter converted to a lambda expression 4.0.0
filter(Lambda) Object delivers a filtered collection 4.0.0
first Object
fold(Lambda, Map) Object folds the collection with the given lambda expression and start value 4.0.0
get(Range) Object
get(int) Object
getClass Class Class of the invoking object
hashCode int
indexOf(Object) int
isCase(Object) boolean
isEmpty boolean Checks whether an expression is empty 4.0.0
isNull boolean Checks whether an expression is null (zero)
iterator Iterator
last Object
lastIndexOf(Object) int
length int
listIterator ListIterator
listIterator(int) ListIterator
map(String) Object delivers a mapped collection, the last parameter converted to a lambda expression 4.0.0
map(Lambda) Object delivers a mapped collection 4.0.0
max Object delivers the maximum element (only applicable if elements are compareable) 4.0.0
max(Comparator) Object delivers the maximum element concerning to the given comparator 4.0.0
max(Lambda) Object delivers the maximum element concerning to the given comparator 4.0.0
min Object delivers the minimum element (only applicable if elements are compareable) 4.0.0
min(Comparator) Object delivers the minimum element concerning to the given comparator 4.0.0
min(Lambda) Object delivers the minimum element concerning to the given comparator 4.0.0
move(int, Section) void
plus(Collection) Collection
plus(Object) Collection
print void default print behaviour of a section list: print all contained sections 4.0.0
print(Object) void
remove(int) Object
remove(Object) boolean
removeAll(Collection) boolean
retainAll(Collection) boolean
reverse List
set(int, Object) Object
set(String, Object) Object
size int the number of contained elements 4.0.0
sort List
sort(String) List
sort(Comparator) List
sort(Lambda) List
subList(int) List
subList(int, int) List
sublist(int) List
sublist(int, int) List
toArray Object[]
toArray(Object[]) Object[]
toJson String Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings) 4.2.14
toString String
toString(String) String Output of elements separated by delimiters as a string 4.0.0
toString(String, String) String Short form for collection.map(attribute).toString(delimiter) 4.0.0
type String

add(List)

Method name Return type Available since
add(List) List

add(Object)

Method name Return type Available since
add(Object) boolean

add(int, Object)

Method name Return type Available since
add(int, Object) void

addAll(Collection)

Method name Return type Available since
addAll(Collection) boolean

addAll(int, Collection)

Method name Return type Available since
addAll(int, Collection) boolean

clear

Method name Return type Available since
clear void

compareTo(Comparable)

Method name Return type Available since
compareTo(Comparable) int

contains(Object)

Method name Return type Available since
contains(Object) boolean

containsAll(Collection)

checks if all elements of the provided element are contained
Method name Return type Available since
containsAll(Collection) boolean 4.0.0

copy

make a (shallow) copy
Method name Return type Available since
copy Collection 4.0.0

create(String, SectionTemplate)

Method name Return type Available since
create(String, SectionTemplate) Section

createAll(Iterable)

Method name Return type Available since
createAll(Iterable) void

diff(SectionList)

Method name Return type Available since
diff(SectionList) List

distinct(Lambda)

filters a collection and returns only the first occurrence relating to a lambda expression
Method name Return type Available since
distinct(Lambda) Collection 4.1

equals(Object)

Method name Return type Available since
equals(Object) boolean

fetch(Long)

Method name Return type Available since
fetch(Long) Section

filter(String)

delivers a filtered collection, the last parameter converted to a lambda expression
Method name Return type Available since
filter(String) Object 4.0.0

filter(Lambda)

delivers a filtered collection
Method name Return type Available since
filter(Lambda) Object 4.0.0

first

Method name Return type Available since
first Object

fold(Lambda, Map)

folds the collection with the given lambda expression and start value
Method name Return type Available since
fold(Lambda, Map) Object 4.0.0

get(Range)

Method name Return type Available since
get(Range) Object

get(int)

Method name Return type Available since
get(int) Object

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

hashCode

Method name Return type Available since
hashCode int

indexOf(Object)

Method name Return type Available since
indexOf(Object) int

isCase(Object)

Method name Return type Available since
isCase(Object) boolean

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.0

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

iterator

Method name Return type Available since
iterator Iterator

last

Method name Return type Available since
last Object

lastIndexOf(Object)

Method name Return type Available since
lastIndexOf(Object) int

length

Method name Return type Available since
length int

listIterator

Method name Return type Available since
listIterator ListIterator

listIterator(int)

Method name Return type Available since
listIterator(int) ListIterator

map(String)

delivers a mapped collection, the last parameter converted to a lambda expression
Method name Return type Available since
map(String) Object 4.0.0

map(Lambda)

delivers a mapped collection
Method name Return type Available since
map(Lambda) Object 4.0.0

max

delivers the maximum element (only applicable if elements are compareable)
Method name Return type Available since
max Object 4.0.0

max(Comparator)

delivers the maximum element concerning to the given comparator
Method name Return type Available since
max(Comparator) Object 4.0.0

max(Lambda)

delivers the maximum element concerning to the given comparator
Method name Return type Available since
max(Lambda) Object 4.0.0

min

delivers the minimum element (only applicable if elements are compareable)
Method name Return type Available since
min Object 4.0.0

min(Comparator)

delivers the minimum element concerning to the given comparator
Method name Return type Available since
min(Comparator) Object 4.0.0

min(Lambda)

delivers the minimum element concerning to the given comparator
Method name Return type Available since
min(Lambda) Object 4.0.0

move(int, Section)

Method name Return type Available since
move(int, Section) void

plus(Collection)

Method name Return type Available since
plus(Collection) Collection

plus(Object)

Method name Return type Available since
plus(Object) Collection

print

default print behaviour of a section list: print all contained sections
Method name Return type Available since
print void 4.0.0

print(Object)

Method name Return type Available since
print(Object) void

remove(int)

Method name Return type Available since
remove(int) Object

remove(Object)

Method name Return type Available since
remove(Object) boolean

removeAll(Collection)

Method name Return type Available since
removeAll(Collection) boolean

retainAll(Collection)

Method name Return type Available since
retainAll(Collection) boolean

reverse

Method name Return type Available since
reverse List

set(int, Object)

Method name Return type Available since
set(int, Object) Object

set(String, Object)

Method name Return type Available since
set(String, Object) Object

size

the number of contained elements
Method name Return type Available since
size int 4.0.0

sort

Method name Return type Available since
sort List

sort(String)

Method name Return type Available since
sort(String) List

sort(Comparator)

Method name Return type Available since
sort(Comparator) List

sort(Lambda)

Method name Return type Available since
sort(Lambda) List

subList(int)

Method name Return type Available since
subList(int) List

subList(int, int)

Method name Return type Available since
subList(int, int) List

sublist(int)

Method name Return type Available since
sublist(int) List

sublist(int, int)

Method name Return type Available since
sublist(int, int) List

toArray

Method name Return type Available since
toArray Object[]

toArray(Object[])

Method name Return type Available since
toArray(Object[]) Object[]

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

toString

Method name Return type Available since
toString String

toString(String)

The individual elements, e.g. of a list, can be output as string, separated by a delimiter which can be chosen freely.

Example:

$CMS_SET(myList, ["House","Key","Window"])$
$CMS_VALUE(myList.toString("; "))$

The elements of the list myList are output, separated each by semicolon and a space character:

House; Key; Window
Method name Return type Available since
toString(String) String 4.0.0

toString(String, String)

Short form for collection.map(attribute).toString(delimiter)
Method name Return type Available since
toString(String, String) String 4.0.0

type

Method name Return type Available since
type String

© 2005 - 2012 e-Spirit AG | All rights reserved. | Last change: 15.12.2010