Skip to main content
Version: 4.3.0

**Enumerated definition**

Table of Contents#

Introduction#

Enumerated components are structures to define label - value lists. They are useful i.e. for translations.

Note: All enumerateds are defined in the Enumerated.xml file at global folder. View project structure for more info.

Enumerated XML structure#

Its structure is the next one:

<enumerated
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation = "https://aweframework.gitlab.io/awe/docs/schemas/enumerated.xsd">
<group id="[Group Id]">
<option label="[Option label]" value="[Option value]" />
<option label="[Option label]" value="[Option value]" />
... more <option>
</group>
... more <group>
</enumerated>

Enumerated structure#

ElementUseMultiples instancesDescription
enumeratedRequiredNoRoot node of the enumerated structure
groupRequiredYesUsed to group the options of the enumerated
optionRequiredYesDefine each of the key - values of a group of options

Group element#

Group element has the following attributes:

AttributeUseTypeDescriptionValues
idRequiredStringGroup identifierNote: The id name must be unique

Option element#

Option element has the following attributes:

AttributeUseTypeDescriptionValues
labelRequiredStringThe label of the optionNote: You can use i18n files (locales)
valueRequiredStringThe value of the optionNote: The id name must be unique

Examples#

Several examples of enumerated groups:

<!-- Enumerated YES (0) | NO (1) -->
<group id="Es1Es0">
<option label="ENUM_NO" value="0" />
<option label="ENUM_YES" value="1" />
</group>
<!-- LANGUAGES -->
<group id="LanUsr">
<option label="ENUM_LAN_ES" value="ESP"/>
<option label="ENUM_LAN_EN" value="ENG"/>
<option label="ENUM_LAN_FR" value="FRA"/>
</group>