Skip to main content

EntityConsumer

This page provides generated reference documentation for the EntityConsumer data model.

A Consumer is a configuration model created at the side of an Entity consuming ("requesting") data of another Entity.

Overview

PropertySummary
descriptionShort technical description of the model in plain text.
documentationContains the documentation of the data model in the popular AsciiDoc format (.adoc). The documentation should be set by the developer to explain different…
titleSingular title of the consumer, e.g. Competitor
childrenList of parameters in this consumer
customProperties
dependency
stateDetermines the state of an element, for example: element can be edited, element is not visible, element is inactive, etc.
stateProcessA process that can determine the state dynamically. You have to return the corresponding state in the process with result.string(...) This will overwrite the…
refreshParentIf any record of the consumer's entity is changed, this consuming entity will also be refreshed.
isOneToOneRelationshipActivate the option if you want to create a one-to-one relationship between records. The consumer can then only provide one data record. With this option, the…
selectionModeDetermines how many elements may be selected. For example, select either none, one dataset or multiple datasets at a time.
selectionModeProcessA process that can determine the selectionMode dynamically. You have to return the corresponding selectionMode in the process with result.string(...). This…
onValidationThe onValidation is executed during loss of focus to check the input for validity. Validations fails, if a message other than true is returned by…
externalInitFilterProcessIn this process define an external filter that is passed to the linked entity during initialization. The provider property "initFilterMergeMode" can be used to…

description

Type: String

Short technical description of the model in plain text.


documentation

Type: String

Contains the documentation of the data model in the popular AsciiDoc format (.adoc). The documentation should be set by the developer to explain different aspects (like purpose, concept, etc.) of the data model that he designed.
You may want to add the plugin "AsciidoctorJ" to your ADITO Designer in order to modify AsciiDoc files.


title

Type: String

Singular title of the consumer, e.g. Competitor


children

Type: Children

List of parameters in this consumer

Parameters

****
  No description.


customProperties

Type: CustomProperties


dependency

Type: EntityDependencyDataModel<?>


state

Type: EComponentState

Determines the state of an element, for example: element can be edited, element is not visible, element is inactive, etc.
Be aware that the concrete impact depends on the element where this property is set: If you take a look at the read-only-value for example: In a recordField this will affect only the field where the state property has been set. In a consumerField all the recordFields within there will be readOnly, and you're not able to add, modify or delete records.
Note when the value "AUTO" is set, that the state does depend on different factors like "In which operatingstate is the record?".


stateProcess

Type: String

A process that can determine the state dynamically. You have to return the corresponding state in the process with result.string(...) This will overwrite the value set in the state property. Example: result.string(count > 0 ? neon.COMPONENTSTATE_DISABLED : neon.COMPONENTSTATE_AUTO);
Note that this property may be internally overwritten (for example if the user has no grants).


refreshParent

Type: Boolean
Default: false

If any record of the consumer's entity is changed, this consuming entity will also be refreshed.


isOneToOneRelationship

Type: Boolean
Default: false

Activate the option if you want to create a one-to-one relationship between records. The consumer can then only provide one data record. With this option, the consumer can be used in viewtemplates that can handle one data record only. E.g. in the GenericViewtemplate


selectionMode

Type: ESelectionMode

Determines how many elements may be selected. For example, select either none, one dataset or multiple datasets at a time.
Be aware that the concrete impact depends on the element where this property is set: In a recordField for example the type of the component that is rendered within the client may change (Lookup-component <-> List-component) while in a consumerField the records that can be selected within a table-presentation of the data may be different.


selectionModeProcess

Type: String

A process that can determine the selectionMode dynamically. You have to return the corresponding selectionMode in the process with result.string(...). This will overwrite the value set in the selectionMode property.


onValidation

Type: String

The onValidation is executed during loss of focus to check the input for validity. Validations fails, if a message other than true is returned by result.string(). result.string("Any Message") or result.string(false) results in failing the validation check, thus displaying the message to the user, not accepting the input data and disabling the save button. If result.string() is not called or result.string(true) is used, the system assumes a positive validation and accepts the input data. This process has to be fast, due to being called multiple times by the system. Do not use it to change the state of components!


externalInitFilterProcess

Type: String

In this process define an external filter that is passed to the linked entity during initialization. The provider property "initFilterMergeMode" can be used to decide whether the filter is automatically AND or OR combined with the entity's initFilterProcess. If the IGNORE option is used, the link is not made automatically and the external filter can be responded to in the initFilterProcess. The external init filter can be obtained from the local variable "$local.filter" in the initFilterProcess.
Which data can be accessed in the process?
The process is called for each consumer when the main entity is initialized. No data record has yet been loaded for the main entity. So the fields have no data yet. Parameters can be accessed normally.
Exception: If a consumer is only used for lookups, fields can be used. Because the lookup models are initialized when the user opens the lookup, all the data of the main entity is already available here.