Start page
Start page

Start page / Template development / Forms / Input components / LIST (new) / PAGE

PAGE typeAvailable from FirstSpirit Version 4.2R4

Contents
for example
to the methods: FormDataList<IdProvidingFormData>

FS_LIST, PAGE type

The FS_LIST type PAGE is used to create a list of sections of the current page. Sections can be selected from this by means of checkboxes. In additional, labeling can be assigned for each section, which can be taken into account in the output.

In the examples below, exemplary configurations for FS_LIST, PAGE type, are presented first (1)).

Then it is shown how previously used configurations of CMS_INPUT_SECTIONLIST are replaced with FS_LIST (2)).

Important On changing over from CMS_INPUT_SECTIONLIST to FS_LIST, please note that if data has been saved with FS_LIST, in the event of a possible subsequent return, due to a different data format, it can no longer be read and interpreted by CMS_INPUT_SECTIONLIST.
Important FS_LIST input components of type PAGE are always language-dependent.

Access-API example use case
The exemplary implementation FsListEditorValueExample shows some simple examples of use for the reading, writing and creating access to the data object (FsListEditorValue) and its inner data container (FormDataList) of the input component by means of the FirstSpirit Access-API.

name
Designator
Mandatory
allowEmpty
YesNo
Optional parameters
hFill
YesNo
Optional parameters
height
PositiveInteger
Optional parameters
hidden
YesNo
Optional parameters
noBreak
YesNo
Optional parameters
preset
Preset
Optional parameters
rows
PositiveInteger
Optional parameters
width
PositiveInteger
Optional parameters
type
DataSourceType
Mandatory
lang
String
Mandatory
resizable
YesNo
Optional parameters
show
YesNo
Optional parameters
sortOrder
SortOrder
Optional parameters
width
PositiveInteger
Optional parameters
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameters
label
String
Optional parameters

Parameter

The following table gives the parameters of the DATASET input component.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone
allowEmptyNo3.0YesNoYES
hFillNo2.0YesNoNO
heightNo4.2.434PositiveInteger500
hiddenNo4.0.44YesNoNO
noBreakNo2.0YesNoNO
presetNo4.0PresetDEFAULT
rowsNo4.2PositiveInteger10
widthNo4.2PositiveIntegerNone

name

The attribute "name" is the variable name of an input component with which the the result object of the input component can be used in the templates - with the help of $CMS_VALUE()$ - or the content can be output.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone

allowEmpty

The "allowEmpty" parameter is used to specify whether a value has to be entered for an input value or not.

If allowEmpty="YES" input is not mandatory; however, it is if allowEmpty="NO".

Input components with allowEmpty="NO" are also called mandatory input components.

The default value for allowEmpty is YES.

ParameterMandatorySinceTypeDefault value
allowEmptyNo3.0YesNoYES

hFill

An input component is always displayed with a pre-defined width.

However, if the input component is to use the full available display width the parameter hFill must be given with the value YES .

ParameterMandatorySinceTypeDefault value
hFillNo2.0YesNoNO

height

The height parameter is used to determine the display height of the input component in pixel.

The parameter expects an integer value. If the parameter is not defined the height of the input component is set by default to 500 pixel.

According to the layout, the function (for example the expand behaviour) and (when indicated) the parameter rows, the height should not be too low.

If the input component is used within a group (CMS_GROUP), the height will comply with the height of the highest input component of the group.

ParameterMandatorySinceTypeDefault value
heightNo4.2.434PositiveInteger500

hidden

With the "hidden" parameter an input component can be hidden from the editor.

If hidden="YES" the input component is not visible for the editor, if hidden="NO" it is visible.

The default value for hidden is NO.

ParameterMandatorySinceTypeDefault value
hiddenNo4.0.44YesNoNO

noBreak

The noBreak parameter can be used to suppress automatic line break after an input component.

The noBreak parameter must be given with value "YES" (noBreak="YES") to suppress the automatic line break.

ParameterMandatorySinceTypeDefault value
noBreakNo2.0YesNoNO

preset

Using the preset attribute the handling of default values in an input component can defined (see also chapter Default values). If preset="default" is set, the fall-back value defined in the form is used. If this value in the form is changed later on, these changes will be affect all usages of this default value in the input components maintained by the editor, as long as a value will be set manually in the input component. This is the default setting. If preset="copy" is set, the value entered by the editor is copied directly into the input component. Subsequent changes to the default value in the form do not have any effect on the usages of this default value in the input components maintained by the editor.

ParameterMandatorySinceTypeDefault value
presetNo4.0PresetDEFAULT

rows

If an overview is defined for the input component of the DATASOURCE types DATABASE, INLINE or SERVICE (<ADD component="overview" ... >) you can use the parameter rows to specify the height of this overview in rows. For this purpose, the number of rows must be specified. For the DATASOURCE type PAGE the figure which is specified by rows refers to the height the input component in rows. A horizontal splitter is available to modify the height of the overview and the detailed views.

The parameter expects an integer value.

The default is 10.

ParameterMandatorySinceTypeDefault value
rowsNo4.2PositiveInteger10

width

The width parameter can be used to specify the display width of the input component in pixels.

The parameter expects an integer value.

If the parameter is not given the default width is 480 pixels.

Important The parameter does not have any effect if the hFill parameter is used.

ParameterMandatorySinceTypeDefault value
widthNo4.2PositiveIntegerNone

DATASOURCEAvailable from FirstSpirit Version 4.2

The DATASOURCE tag defines the data type the input component should draw from.

If the tag is given more than once for an input component, the last/lowest definition is always adopted and all other definitions are removed.

ParameterMandatorySinceTypeDefault value
type*Yes4.2.403DataSourceTypeNone

type

The mandatory parameter type defines the data type which the input component should draw from or, rather, the type of data origin.

The following types are supported:

  • DATABASE: With this parameter it is possible to create a list of data sets. The table template on which the content source is based, from which data sets are to be selected or created in the new data sets, must be given with the TABLE tag.
  • INLINE: With this parameter it is possible to create a list of sections and links. The TEMPLATES tag and its source parameter must be used to define whether a section or link list is to be defined.
  • PAGE: With this parameter it is possible to display a list of the sections of the current page.
  • SERVICE: With this parameter it is possible to use a service module to link to external data suppliers which provide data for the input component. Further information on the configuration is provided in the FirstSpirit Developer Manual for Components.

ParameterMandatorySinceTypeDefault value
type*Yes4.2.403DataSourceTypeNone

LABELSAvailable from FirstSpirit Version 4.2.403

By default, the following are used for labeling, e.g. the labeling of the overview, tab, bars and tool tips:

  1. the names of all input components, which are contained in the selected section, link or table template (identifiers), in square brackets and
  2. the values (if available), which are saved in the input components, if they are of the data type string (e.g. CMS_INPUT_TEXT, CMS_INPUT_TEXTAREA, CMS_INPUT_DOM)

FS_LIST, inline, no labels

The LABELS tag can be used to influence the labeling.

Important DATASOURCE type PAGE: LABELS / LABEL are not supported for this data source type.

In this case, a LABEL tag must be given for each language.

IMPORTANT: At least the fall-back label ("*") must be defined:

<LABELS>
<LABEL lang="*">...</LABEL>
</LABELS>

LABELAvailable from FirstSpirit Version 4.2

The LABEL tag can be used to define flexible, language-dependent labeling for each language.

To define the labeling for a language, the abbreviation of the project language must be given in the lang parameter:

...
<LABEL lang="DE">...</LABEL>
<LABEL lang="EN">...</LABEL>
...

Fall-back values are given with the special language code * ("for all languages"):

...
<LABEL lang="*">...</LABEL>
...

The lang parameter is a mandatory parameter.

The labeling text is given within an opening and closing <LABEL> tag (see placeholder TEXT).

ParameterMandatorySinceTypeDefault value
lang*Yes4.2StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see View document, Chapter "Language templates") to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes4.2StringNone

TEXTAvailable from FirstSpirit Version 4.2

Here it is possible to define alternative labeling.

The system object #item is available to access the values stored in the input component.

In the case of the DATASOURCE type DATABASE, the variable of the column (identifier of the input component) is appended, separated by a dot, e.g.

#item.cs_lastname

If the table referenced via FS_LIST is connected to another table via a foreign (external) key, the values of a column in the connected table can be used for the labeling in FS_LIST by using #item with the foreign key identifier and the required column name, e.g.

#item.product_Properties_Type.Name

where product_Properties_Type is the foreign key name, Name is the name of a column in the table defined via product_Properties_Type.

In the case of the DATASOURCE type INLINE, the variable of the respective section or link template (identifier of the input component) is appended, separated by a dot, e.g.

#item.st_headline

In both cases, combinations of the values of several input components are also possible, e.g.

<LABELS>
<LABEL lang="*">#item.cs_firstname + " " + #item.cs_lastname</LABEL>
</LABELS>

In order, for example, to define an alternative value for display, in case the input component concerned is not filled, the if(...) function can be used, e.g.

<LABELS>
<LABEL lang="*">if(#item.st_headline.isEmpty, "No headline", #item.st_headline)</LABEL>
</LABELS>

In this example, the text "No headline" is displayed if the input component is not filled.

In the case of the DATASOURCE type INLINE, the identifier of input components of different section and link templates can also be given. This option suggests itself if the selection is not limited to one template and the identifiers of the input components vary from template to template. If an identifier given by #item is not available in the template selected by the editor, nothing is output.

Example:
FS_LIST enables the selection to be made from two section templates of which one contains a text field with the identifier "st_text" and one contains a text field with the identifier "st_headline".

If the editor now chooses the section template containing the identifier "st_text", the syntax

<LABELS>
<LABEL lang="*">#item.st_text + #item.st_headline</LABEL>
</LABELS>

uses the stored value of the input component "st_text" for the labeling.
If the editor chooses the section template containing the identifier "st_headline", the stored value of the input component "st_headline" is used.

If a template contains both identifiers, both are used for the labeling. A separator should be provided for this case, e.g.

<LABELS>
<LABEL lang="*">#item.st_text + " " + #item.st_headline</LABEL>
</LABELS>
Important Care should be taken to ensure that the variables used (identifiers of the input components) are given correctly, and the variables should also actually be present in the templates available to choose from. Otherwise, the default labeling is used (name and all values of all input components of the selected template). For optimum clarity and user-friendliness of the component, the shortest possible labeling should be chosen.

In the case of the DATASOURCE type INLINE, it is also possible to determine the template of a section or link in the list. The system object #template is available for this purpose.

The reference name of the template used can, e.g., be output for labeling via the following syntax:

<LABELS>
<LABEL lang="*">#template.uid</LABEL>
</LABELS>

Here, too, the if(...) function can be used to implement labeling depending on the template selected.

DATASOURCE type PAGE: LABELS / LABEL are not supported for this data source type.

COLUMNSAvailable from FirstSpirit Version 4.2

By default, the input component shows a list of all the sections of the page, each with a checkbox for selecting individual sections and a text field via which a name can be assigned to each section.

In addition, COLUMNS / COLUMN can also be used to show a column with consecutive numbering.

The COLUMNS tag can be used to change the display.

COLUMN

The COLUMN tag can be used to define properties for one column.

The name of the column to which the properties are to apply, is given within an opening and closing COLUMN tag (see TEXT placeholder of the COLUMNS tag).

ParameterMandatorySinceTypeDefault value
resizableNo4.2YesNoYES
showNo4.2YesNoYES
sortOrderNo4.2SortOrderNone
widthNo4.2PositiveIntegerNone

resizable

The resizable parameter has no effect on this DATASOURCE type.

ParameterMandatorySinceTypeDefault value
resizableNo4.2YesNoYES

show

The show parameter can be used to define whether a column (see COLUMNS / COLUMN / TEXT) is displayed in the input component or not.

If COLUMNS / COLUMN is not given,

<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>

is automatically added on saving. In this configuration, all columns except the column with the consecutive numbering are displayed.

If COLUMN is given for a column, by default it is displayed (show="YES").

If a column is to be hidden, show="NO" must be set. Other parameters within COLUMN then have no effect on the column concerned.

ParameterMandatorySinceTypeDefault value
showNo4.2YesNoYES

sortOrder

The sortOrder parameter has no effect on this DATASOURCE type.

ParameterMandatorySinceTypeDefault value
sortOrderNo4.2SortOrderNone

width

The width parameter can be used to specify the display width of the column in pixels.

The parameter expects an integer value.

If the parameter is not given the column width corresponds to the content of the columns.

ParameterMandatorySinceTypeDefault value
widthNo4.2PositiveIntegerNone

TEXTAvailable from FirstSpirit Version 4.2

The column to which the properties are to apply is defined here.

The following identifiers are used for this:

  • #identifier: Column with consecutive numbering
  • #text: Column with checkbox

This identifier is enclosed by an opening and closing COLUMN tag.

If COLUMNS / COLUMN is not given, the following configuration is automatically added upon saving:

<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>

LANGINFOSAvailable from FirstSpirit Version 4.0

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see View document, Chapter "Language templates") to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to give a description which is used to display a tool tip (mouse-over).

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

The label parameter is used to give the surface labelling for input and visualisation components.

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone
Key

LanguageAbbreviation

Language abbreviation, e.g. DE, EN, FR or * for return values

PositiveInteger

Positive integer

YesNo

Switch to apply an attribute or not

NOAvailable from FirstSpirit Version 2.0

Do not apply attribute

YESAvailable from FirstSpirit Version 2.0

Apply attribute

SortOrder

Switch with which to define the sort order of the entries

KEEP_ORDERAvailable from FirstSpirit Version 3.0

Retain the sort order of the entries

ASCENDINGAvailable from FirstSpirit Version 3.0

Sort entries alphabetically in ascending order

DESCENDINGAvailable from FirstSpirit Version 3.0

Sort entries alphabetically in descending order

String

A random character string

Preset

How to deal with default values

CopyAvailable from FirstSpirit Version 4.0

The value entered by the editor is copied directly into the input component, subsequent changes do not have any effect

DefaultAvailable from FirstSpirit Version 4.0

The fall-back value defined in the form is used, as long as a value will be set manually

DataSourceType

Data origin types

DATABASEAvailable from FirstSpirit Version 4.2.403

Access to the data of a table

INLINEAvailable from FirstSpirit Version 4.2.403

Access to data via section or link templates

PAGEAvailable from FirstSpirit Version 4.2.403

Access to sections on the current page

SERVICEAvailable from FirstSpirit Version 4.2.403

Access to data from external components or modules

Designator

Unique identifier of variable length; must start with a letter or underscore and may only contain the characters "A-Z", "a-z", "0-9" and "_", e.g. "fr_st_varName"

Examples

1) Configuration example of FS_LIST, PAGE type

<FS_LIST name="IDENTIFIER">
<DATASOURCE type="page"/>
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</FS_LIST>

2) Displaying the input component CMS_INPUT_SECTIONLIST

The input component FS_LIST can be used to display the functions of the input component CMS_INPUT_SECTIONLIST.

Important On changing over from CMS_INPUT_SECTIONLIST to FS_LIST, please note that if data has been saved with FS_LIST, in the event of a possible subsequent return, due to a different data format, it can no longer be read and interpreted by CMS_INPUT_SECTIONLIST.

Example form CMS_INPUT_SECTIONLIST:

<CMS_INPUT_SECTIONLIST name="IDENTIFIER">
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</CMS_INPUT_SECTIONLIST>

Display using FS_LIST:

<FS_LIST name="IDENTIFIER">
<DATASOURCE type="page">
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</FS_LIST>

Apart from changing over the form tag from CMS_INPUT_SECTIONLIST to FS_LIST it is only necessary to add

<DATASOURCE type="page"/>

<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>

for hiding the column with the consecutive numbering (#identifier) is automatically added when the template is saved.

© 2005 - 2015 e-Spirit AG | All rights reserved. | Last change: 2013-12-09