Start page
Start page

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

Data type TargetReferenceAvailable from FirstSpirit Version 4.2

Value range of the data type DatasetContainer

FirstSpirit provides the data type TargetReference for processing values which represent a reference to a FirstSpirit object.

The data type TargetReference returns a reference to any FirstSpirit object. The type of the referenced object is not determined: references can be selected to media (pictures and files), to document groups, folders, pages (Page Store), page references (Site Store) and Content2 objects (Content Store) as well as to any other Store.

For further information about the data type TargetReference see API documentation:

de.espirit.firstspirit.access.editor.value.TargetReference

Definition using the standard input components

The input component FS_REFERENCE can be used for including references to FirstSpirit objects (page references, pages from the Page Store, media etc.).

This input component returns the data type TargetReference when accessing the stored value by means of a $CMS_VALUE(...)$ instruction.

Methods on TargetReference objects

The table below lists all methods which can be invoked on objects of data type TargetReference:

The object is generated by the following form objects:
FS_REFERENCE
Method name Return type Brief description Available since
compareTo(Comparable) int
equals(Object) boolean
get IDProvider
getClass Class Class of the invoking object
getContent Content2
getDocumentGroup DocumentGroup
getLanguage Language
getMedia Media
getPage Page
getPageRef PageRef
getRemoteSymName String
getSection Section
getSectionName String
getStoreType Store$Type
getUid String
getUidType IDProvider$UidType
isCase(Object) boolean
isEmpty boolean Checks whether an expression is empty
isNull boolean Checks whether an expression is null (zero)
loadSection(Page, String) Section
print void
resetTo(IDProvider, String) void
set(IDProvider) void
set(String, Object) Object
setRemoteSymName(String) void
setSection(Section) void
setSectionName(String) void
setUid(String) void
setUidType(IDProvider$UidType) void
toJson String Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings) 4.2.14
toString String
type String

compareTo(Comparable)

Method name Return type Available since
compareTo(Comparable) int

equals(Object)

Method name Return type Available since
equals(Object) boolean

get

Method name Return type Available since
get IDProvider

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

getContent

Method name Return type Available since
getContent Content2

getDocumentGroup

Method name Return type Available since
getDocumentGroup DocumentGroup

getLanguage

Method name Return type Available since
getLanguage Language

getMedia

Method name Return type Available since
getMedia Media

getPage

Method name Return type Available since
getPage Page

getPageRef

Method name Return type Available since
getPageRef PageRef

getRemoteSymName

Method name Return type Available since
getRemoteSymName String

getSection

Method name Return type Available since
getSection Section

getSectionName

Method name Return type Available since
getSectionName String

getStoreType

Method name Return type Available since
getStoreType Store$Type

getUid

Method name Return type Available since
getUid String

getUidType

Method name Return type Available since
getUidType IDProvider$UidType

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

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

loadSection(Page, String)

Method name Return type Available since
loadSection(Page, String) Section

print

Method name Return type Available since
print void

resetTo(IDProvider, String)

Method name Return type Available since
resetTo(IDProvider, String) void

set(IDProvider)

Method name Return type Available since
set(IDProvider) void

set(String, Object)

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

setRemoteSymName(String)

Method name Return type Available since
setRemoteSymName(String) void

setSection(Section)

Method name Return type Available since
setSection(Section) void

setSectionName(String)

Method name Return type Available since
setSectionName(String) void

setUid(String)

Method name Return type Available since
setUid(String) void

setUidType(IDProvider$UidType)

Method name Return type Available since
setUidType(IDProvider$UidType) void

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

type

Method name Return type Available since
type String

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