Configuration Guide

Attributes Widgets

Definition

This part describes all existing attributes widgets to display or edit attributes on the features.

When configuring an attribute widget there is always two possibilities :

  • configure the Attribute Editor to display or edit attributes using the basic configuration defined in the Attribute Editor Definition.

  • configure the display or edition of attributes using a dedicated Widget dedicated for a feature

By default, we recommend using attribute editor to minimize feature's configuration and overloading widget's attribute configurations only for features where it is necessary.

Attribute Editor Widget without overload

Attribute Editor Widget with overload

image-20220927-210735.png
image-20220927-210742.png

Available Widgets

Widget

For what type of Attributes ?

Edit

Display

Text

String

check mark

check mark

Date

Date or date & time type.

check mark

check mark

Number

Integer number or decimal number type.

check mark

check mark

Boolean

Boolean type.

cross mark

check mark

Float

Decimal number type.

cross mark

check mark

Image

Binary type.

check mark

check mark

Certificate

Binary type defining a certificate.

cross mark

check mark

Rights

Rights.

check mark

check mark

Object Reference

Attributes that are defined as Object Reference (display an additional search pop-up).

check mark

check mark

Standalone Text

Display text which is not linked to an attribute.

cross mark

check mark

Binary

Binary type.

check mark

cross mark

Select

String type and a choice rule.

check mark

cross mark

Checkbox

String or a boolean type.

check mark

cross mark

Radio

String type by configuring a list of values.

check mark

cross mark

Toggle

Boolean type.

check mark

cross mark

Tags

Flags and reserved flags.

check mark

cross mark

Configuration

Global Properties

There is global properties common to all attributes wiget, these are described below :

Property name

Type

Mandatory

Description

Values (default value in bold)

label

String

NO


Used to define the label displayed with the attribute.

By default, we recommend to let this property empty to use the default i18n key of the attribute.

If a specific label needs to be displayed in a specific context we recommend to indicate here the identifier of an i18n key, to be able to display the text according to language. Otherwise if the label is hardcoded it won’t be translated.

Example :

  • Specific label not translated : Lastname

  • Specific label translated : ui.model.attributes.lastname.internal.name

  • If empty, the default i18n key for the attribute will be used.

lockedInUi

Boolean

NO

Used to define if the attribute is not modifiable but visible by a user in the feature.

true, false

mode

String

NO

Used to define the mode of the attribute and therefore if the user can modify the value of the attribute or not.

READ
READ_WRITE

multiValued

Boolean

NO

Used to define if the attribute is a multivalued one or not and therefore if the user can add several values or not.

The value of this property must be consistent with the configuration of the attribute (multi-valued property in the object type).

true, false

override

Boolean

NO

Used to indicate if the configuration at feature level overrides or not the configuration of the attribute editor linked to the attribute definition.


false: the attribute will have the configuration configured in Attribute Editor Definition.

true: the configuration configured in Attribute Editor Definition will be overridden by the configuration defined in the feature.

attributeId

String

YES

Used to indicate the id of the Attribute.

-

Exemple

Attribute Editor Widget without overload

Attribute Editor Widget with overload

XML
<widget id="id" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<label></label>
       	<mode>READ</mode>
       	<multiValued>false</multiValued>
      	<override>false</override>
    </config>
    <attributeId>id</attributeId>
</widget>


XML
<widget id="id" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
	<config>
		<editor>
			<displayWidget xsi:type="ctdbum:TextDisplayWidgetType">
				<hidden>false</hidden>
				<config>
					<backgroundColor>#ffffff</backgroundColor>
					<bold>false</bold>
					<fontSize>INHERIT</fontSize>
					<italic>false</italic>
					<textAlign>LEFT</textAlign>
					<textColor>#000000</textColor>
					<underline>false</underline>
				</config>
			</displayWidget>
		</editor>
		<label></label>
		<lockedInUi>false</lockedInUi>
		<mode>READ</mode>
		<multiValued>false</multiValued>
		<override>true</override>
	</config>
	<attributeId>id</attributeId>
</widget>

Attribute Editor Widget

The Attribute Editor Widget allows to display the basic configuration defined in the Attribute Editor Definition.

This Widget defines how the attributes will be presented depending on the mode:

  • READ to display the attribute

  • READ_WRITE to edit the attribute. 

Attribute definition is linked to its Attribute editor, thanks this, the system selects the right display or edit mode.

  • Attribute Editor

    Editor attributes are used to define the style to be used in read and write mode for an attribute.