CMS_INPUT_TABLIST
Contents |
for example |
to the methods: List<Entity> |
The CMS_INPUT_TABLIST input component is only used within the Content Store (in the CS2 only). It provides a convenient option for editing data set lists.
Attributes of the list are displayed as labelling for the tabs, while the editing of the attributes takes place within the tab. This editing screen mask is specified by means of a template. The linked data records can be edited and saved via the input component.
IMPORTANT: The attribute to be displayed as the tab labelling may only be one link away from the database table whose content is to be displayed on the tab.
Access-API example use case
The exemplary implementation TabListEditorValueExample shows some simple examples of use for the reading, writing and creating access to the data object (TabListEditorValue) and its inner data container (java.util.List
- Example of use: TabListEditorValueExample
- Data object: ReferenceEditorValue
- Container type: java.util.List
- see also: Entity
Mandatory
Mandatory
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Optional parameter
Mandatory
Optional parameter
Optional parameter
Optional parameter
Parameter
The following table gives the parameters of the TABLIST input component.
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
name* | Yes | 3.1 | Designator | None |
table
The table parameter is used to give the reference to the table template.
The value given must be the unique identifier of the table template.
The reference is required to specify from which table selections can be made and which input components are to be displayed.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
table* | Yes | 3.0 | TableTemplateReference | None |
allowChoose
The allowChoose parameter can be used to specify whether existing content store data may be selected in the input component or not.
As a default, the selection of content store data is possible.
If allowChoose is given with NO (allowChoose="NO"), selection is not longer possible. Content store data can then only be added to the input components by creating new content store data.
If allowChoose is given with NO and allowNew (see above) is not given, new entries can be created. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
allowChoose | No | 3.0 | YesNo | YES |
allowEdit
The allowEdit parameter can be used to allow as well as to prevent the editing of entries in the input component.
If the parameter is not given, the entries can be edited.
The editing of entries is made possible by specifying NO (...allowEdit="NO"...) not possible.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
allowEdit | No | 3.0 | YesNo | YES |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
allowEmpty | No | 3.0 | YesNo | YES |
allowNew
The allowNew parameter can be used to allow as well as to prevent the creation of new entries.
If the parameter is not given, no new entries can be created.
If YES (...allowNew="YES"...) is specified, new entries can be created.
If allowNew is not given and for allowChoose (see above) NO is given, new entries can be created. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
allowNew | No | 4.0 | YesNo | NO |
convertEntities
The "convertEntities" attribute is used to convert special characters entered in the input components for output in HTML characters.
There are three forms:
- convertEntities="NONE" (standard)
- convertEntities="STANDARD"
- convertEntities="QUOTE"
With the NONE form, no conversion rules whatsoever are applied.
If STANDARD is given the conversion rules in the "convert" area of the selected conversion rule of the presentation channel are applied.
The form QUOTE explicitly includes STANDARD too. However, the "quote" area of the conversion rule is also applied.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
convertEntities | No | 2.0 | ConvertEntity | NONE |
delete
The delete parameter is used to specify whether, when content store data is deleted, the content store data of other tables linked by the corresponding input component is to be deleted at the same time or not (Dependent Deletion).
This function is deactivated as a default. The function can be activated by specifying YES for the parameter (delete="YES").
It is necessary to ensure that when the content schemata was created Dependent Deletion was activated in the options of the relevant external key relationships. Otherwise delete has no effect. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
delete | No | 3.0 | YesNo | NO |
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 .
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
hFill | No | 2.0 | YesNo | NO |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
hidden | No | 4.0.44 | YesNo | NO |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
noBreak | No | 2.0 | YesNo | NO |
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 retrieval 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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
preset | No | 4.0 | Preset | DEFAULT |
sortOrder
The sortOrder parameter can be used to influence the sort order of the entries in the input component.
Three key terms can be used for the parameter:
- sortOrder="KEEP_ORDER" (standard)
- sortOrder="ASCENDING"
- sortOrder="DESCENDING"
With KEEP_ORDER the given order of the entries is retained.
With the value ASCENDING the entries are alphabetically sorted in ascending order and with DESCENDING they are alphabetically sorted in descending order.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
sortOrder | No | 4.0.56 | SortOrder | KEEP_ORDER |
tabAttribute
The tabs of the input component CMS_INPUT_TABLIST are labelled by the ID of the respective data set, by default (no definition of tabAttribute and/or expression). By means of tabAttribute attributes from the table, defined by the parameter table, can be used for labelling. tabAttribute demands as value the column name, as given in the database schema editor and displayed for example on the tab "Mapping" of the respective table template in the language-dependent columns (DE, EN etc.), e. g. ...tabAttribute="name_EN"..., or a foreign key.
Labels can not be made language-independently by using tabAttribute: the attribute, selected in one language, will be displayed in all other languages, too. For this reason it is recommended to use this parameter primarily in case of language-independent entries. For a language-dependent labelling please use the parameter expression (see below).
Please pay attention that the column name is specified correctly and that the columns really exist in the specified table. Otherwise ? will be displayed as label. If the respective column has got not entry, no label will be displayed. |
If tabAttribute is defined, the parameter expression (see below) will not be interpreted. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
tabAttribute | No | 3.0 | String | None |
useLanguages
The useLanguages parameter can be used to specify whether or not an input component is to store different or deviating values for different languages (multi-lingual maintenance).
If the parameter is not given, deviating values are stored for the different languages as a default.
If NO (...useLanguages="NO") is specified, one value is stored for all languages.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
useLanguages | No | 2.0 | YesNo | YES |
LANGINFOS
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.
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.
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.
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>
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.
LANGINFO
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 3.1 | LanguageAbbreviation | None |
description | No | 3.1 | String | None |
expression | No | 4.0 | String | None |
label | No | 3.1 | String | None |
lang
The lang parameter is used to give the language abbreviation which is entered in the server properties see FirstSpirit Manual for Administrators, 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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 3.1 | LanguageAbbreviation | None |
description
The description parameter can be used to give a description which is used to display a tool tip (mouse-over).
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
description | No | 3.1 | String | None |
expression
By default when the parameter tabAttribute and / or expression) are not set, the tabs of the input component CMS_INPUT_TABLIST are labelled with the ID of the respective data set. By means of expression values from the table which is defined by the parameter table can be used for dynamic labelling.
For this purpose, the system objects #item and #row are available. They represent e.g. the row of the database, defined by the parameter table, which is to be displayed. One column of the database row can be used for the labelling, separated by a dot, e.g. #item.Headline_EN.
Furthermore, language-specific endings are added automatically by means of the expression mechanism, if they are existing. I.e. the following definition can be given:
<CMS_INPUT_TABLIST name="st_tablist" table="Products.jobs">
<LANGINFOS>
<LANGINFO lang="*" label="Country" expression="#item.JobTitle_EN"/>
</LANGINFOS>
</CMS_INPUT_TABLIST>
Please pay attention that the column name is specified correctly and that the columns really exist in the specified table. Otherwise there will not be displayed any value in the data sources' overview. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
expression | No | 4.0 | String | None |
label
The label parameter is used to give the surface labelling for input and visualisation components.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
label | No | 3.1 | String | None |
Example
An example of the input component "CMS_INPUT_TABLIST":
<CMS_INPUT_TABLIST useLanguages="NO" table="TABLE TEMPLATE" hFill="YES" name="IDENTIFIER">
<LANGINFOS>
<LANGINFO lang="*" label="TEXT" description="TEXT"/>
<LANGINFO lang="DE" label="TEXT" description="TEXT"/>
<LANGINFO lang="EN" label="TEXT" description="TEXT"/>
</LANGINFOS>
</CMS_INPUT_TABLIST>