Skip to main content
Skip table of contents

Select Widget

Definition

The Select Edit Widget allows to configure the edit of a string type and a choice rule (not mandatory) attribute.

Configuration

Properties

Property name

Type

Mandatory

Description

Values (default value in bold)

i18nPrefix

String

NO

Allows to define the first part of the i18n key for each configured id.

If this property is used, you cannot use the <text> property, otherwise the translation not will be taken into account.

-

options

List<SelectEditWidgetOptionType>

NO

Allows to define one or several value(s) to choose from (if there is no configured choice rule directly on the attribute).

-

sort

Enum

NO

Defines the criterion for sorting values in the choice list.

AUTO, VALUE, LABEL

options properties

Property name

Type

Mandatory

Description

Values (default value in bold)

option

SelectEditWidgetOptionType

NO

Defines the different values.

-

option properties

Each option will have the following configuration:

Property name

Type

Mandatory

Description

Values (default value in bold)

id

String

NO

Defines a unique id for each option.

-

text

String

NO

Defines, for each id, the text that will be displayed to the user. 

Example

Select Edit

Select Edit with i18nPrefix

CODE
<widget id="scopedright" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<editWidget xsi:type="ctdbum:SelectEditWidgetType">
            	<hidden>false</hidden>
                <config>
                    <required>false</required>
                    <options/>
                    <sort>AUTO</sort>
                </config>
            </editWidget>
        </editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ_WRITE</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>scopedright</attributeId>
</widget>

CODE
  <widget id="status" xsi:type="ctdbum:AttributeEditorWidgetType">
     <hidden>false</hidden>
     <config>
        <editor>
           <editWidget xsi:type="ctdbum:SelectEditWidgetType">
              <hidden>false</hidden>
              <config>
                 <label>Status</label>
                 <required>true</required>
                 <i18nPrefix>ui.model.attribute.status.values</i18nPrefix>
                 <options>
                    <option>
                       <id>DRAFT</id>
                    </option>
                    <option>
                       <id>COMPLETE</id>
                    </option>
                    <option>
                       <id>NORMAL</id>
                    </option>
                 </options>
                 <sort>AUTO</sort>
              </config>
           </editWidget>
        </editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ_WRITE</mode>
        <multiValued>false</multiValued>
        <override>true</override>
     </config>
     <attributeId>status</attributeId>
  </widget>

In this case, the i18n keys should be:

  • ui.model.attribute.status.values.DRAFT.label

  • ui.model.attribute.status.values.COMPLETE.label

  • ui.model.attribute.status.values.NORMAL.label

Read Next

  • Features

    Design screens and business features to manage objects.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.