Editors

Editors define the appearance and behavior of a field during inline editing of a journal record and during filtering. Each attribute type has its own editor, which is set in the journal column configuration in the editor field.

Important

formatter and editor in the column configuration are independent fields:

  • formatter controls cell rendering in the table;

  • editor controls the inline editor and the filter control in the column header.

If a column does not have an editor set, the filter value input will be empty — even if formatter is correctly configured. The most common case is columns of type ASSOC: the assoc formatter only handles display, while the filter requires an editor (typically type: journal).

Column type to editor mapping:

Column type (type)

Editor (editor.type)

ASSOC

journal

PERSON / AUTHORITY_GROUP / AUTHORITY

orgstruct

TEXT / MLTEXT

text

NUMBER / INT / LONG / FLOAT / DOUBLE

number

DATE

date

DATETIME

datetime

BOOLEAN

boolean

Note

Computed attributes can be used in editors.

Settings

Go to the administration section > Journals > find the required journal > Edit action. Navigate to Advanced.

../../../../_images/editor_1.png ../../../../_images/editor_2.png

Types

BooleanEditor

Type: boolean

Key

Value

Default

mode

Editor mode select:

../../../../_images/editor_3.png

checkbox:

../../../../_images/editor_4.png

select

DateEditor

Type: date

DateTimeEditor

Type: datetime

JournalEditor

Type: journal

Used for columns of type ASSOC — handles both inline editing of the association value and the filter control in the column header. There is no separate editor with type assoc: for any association, editor.type: journal must be specified.

Key

Value

Default

journalId

The identifier of the journal from which the value will be selected. Typically — the journal associated with the target association type.

Example of a complete ASSOC column configuration with formatter and editor:

- id: urgencyClass
  name:
    ru: Класс срочности
  type: ASSOC
  multiple: true
  searchable: true
  formatter:
    type: assoc
    config:
      sourceId: emodel/ecos-urgency-class
  editor:
    type: journal
    config:
      journalId: ecos-urgency-class

Here formatter defines how the cell is rendered, and editor defines how the filter in the header and the inline value editor look. Without the editor block, the filter will remain empty.

NumberEditor

Type: number

OrgstructEditor

Type: orgstruct

Configuration:

Key

Value

Default

allowedAuthorityTypes

options string: GROUP, USER

multiple

multiple selection boolean

false

SelectEditor

Type: select

Configuration:

Static options can be defined, or options can be retrieved using the recordRef + attribute of a record and the optionsAtt parameter.

Key

Value

Default

options

JSON options string
e.g. [{"label":"priority.high","value":1},
{"label":"priority.low","value":3},
{"label":"priority.medium","value":2}]

optionsAtt

e.g. _edge.${attribute}.options{value:?str,label:?disp}

_edge.${attribute}.options{value:?str,label:?disp}

TextEditor

Type: text