Skip to main content
Skip table of contents

Attribute Editor

Definition

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

This avoids having to redefine the style for each functional configuration. It's always possible to overload the configuration if, for a given feature, the attribute is to appear differently from the standard.

An Attribute Editor is made of two main parts:

  • The display part: the "display" part is used to describe how the Attribute value is displayed when it is inserted in a view where it is not supposed to be edited at all.

  • The edit part: the "edit" component is used to describe how the Attribute value is displayed when it can be edited by the user.

A default Attribute Editor is initialized at creation of the Attribute definition. It is however possible to modify the different parameters according to the Attribute Definition.

Configuration

You can access the Attribute Editor configuration :

  • by clicking on "Portal" → "Attribute Editors"

  • directly from the attribute configuration page by clicking on “Attribute Definition Editor

  • by clicking on "System" → "Configurations" → "Data Model" and perform an import/export. Currently this is the only way to configure advanced Attribute Editor like ObjectReference.

Properties

The properties to be configured for an attribute editor depend on the type of attribute concerned. For example, the properties to be configured for a string-type attribute will not be the same as for an identity-type attribute.

The interfaces will therefore guide the configurator through the properties to be set according to the type of attribute.
For advanced xml configuration of an attribute editor, the various properties are described for each attribute widget on a dedicated page.

Display part example

Capture d'écran 2024-06-13 113651.png

Edit part example

Usage

Below you'll find two examples of how to configure the display of an attribute in a feature, one using the attribute editor and the other not (with a specific style for the feature).

Configuration example (for a string attribute)

Preview

Display of an attribute using the default attribute editor :

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

Display an attribute in a special way for a specific feature, thus overloading the attribute editor configuration :

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

In the case of configuration overloading, the overrideproperty must be set to true and each obligatory property must be filled in.

We therefore recommend configuring and, above all, using the editor attribute for all attributes whose style is common to all contexts, thus avoiding the need to redefine style properties for every feature. As shown in the example above, configuring an attribute using the attribute editor is much simpler. Of course, for specific contexts where the style must be different, overriding is always possible.

Read Next

  • Object Types

    An Object Type allows to define the types of Object that will be managed in the Memority Portal application and used in Features, rules etc...

  • Reference Table

    A Reference Table allows to manage a list of “static” values, such as a list of countries, which can then be exposed and accessed in script rules, to ultimately present a list of choices to users in a form for example.

JavaScript errors detected

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

If this problem persists, please contact our support.