Skip to main content

EntityProperty

Defined in: js-api/src/entities/property.ts:279

A dynamic property associated with the entity.

Extends​

Constructors​

Constructor​

new EntityProperty(dart): EntityProperty

Defined in: js-api/src/entities/property.ts:280

Parameters​

ParameterType
dartany

Returns​

EntityProperty

Overrides​

Property.constructor

Properties​

PropertyModifierTypeDescriptionInherited fromDefined in
dartreadonlyany-Property.dartjs-api/src/entities/property.ts:33
optionspublicanyThe union of the property's tags and its FuncParam options (tags win) — exactly what InputBase.getOption reads. Treat as readonly: writes stick only for FuncParam-backed properties without tags (those get the live options map).Property.optionsjs-api/src/entities/property.ts:38
propertyOptionsstaticobjectMetadata of the property options themselves (what a property editor shows for each option).Property.propertyOptionsjs-api/src/entities/property.ts:248
propertyOptions.caption?publicIProperty & IPropertyAnnotationCustom field caption shown in [PropertyGrid]. Alias of friendlyName; both stay.-js-api/src/entities/property-meta.ts:72
propertyOptions.category?publicIProperty & IPropertyAnnotationCorresponding category on the context panel; groups the property in a property panel.-js-api/src/entities/property-meta.ts:63
propertyOptions.choices?publicIProperty & IPropertyAnnotationList of choices. Applicable to string properties only-js-api/src/entities/property-meta.ts:56
propertyOptions.columnTypeFilter?publicIProperty & IPropertyAnnotationFilter for columns, can be numerical, numerical_no_datetime, categorical, datetime, categorical_or_datetime, or directly a column type (string, int...) Applicable when type = Column-js-api/src/entities/property-meta.ts:110
propertyOptions.defaultValue?publicIProperty & IPropertyAnnotationDefault value used for deserialization and cloning. See also initialValue.-js-api/src/entities/property-meta.ts:89
propertyOptions.description?publicIProperty & IPropertyAnnotationProperty description-js-api/src/entities/property-meta.ts:32
propertyOptions.editor?publicIProperty & IPropertyAnnotationPlatform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only for the types Dart honors it for (input_base.dart:702-728).-js-api/src/entities/property-meta.ts:60
propertyOptions.fieldName?publicIProperty & IPropertyAnnotationName of the corresponding JavaScript field. No need to specify it if it is the same as name.-js-api/src/entities/property-meta.ts:100
propertyOptions.format?publicIProperty & IPropertyAnnotationValue format, such as '0.000', applied through DG.format where the platform is loaded.-js-api/src/entities/property-meta.ts:66
propertyOptions.friendlyName?publicIProperty & IPropertyAnnotationCustom field friendly name shown in [PropertyGrid]-js-api/src/entities/property-meta.ts:69
propertyOptions.get?publicIProperty & IPropertyAnnotationReads the property value off an object. A property with no set renders read-only.-js-api/src/entities/property-meta.ts:80
propertyOptions.initialValue?publicIProperty & IPropertyAnnotationInitial value used when initializing UI. See also defaultValue-js-api/src/entities/property-meta.ts:86
propertyOptions.inputType?publicIProperty & IPropertyAnnotationPlatform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every other hint, as it does in input_base.dart:668.-js-api/src/entities/property-meta.ts:26
propertyOptions.max?publicIProperty & IPropertyAnnotationMaximum value. Applicable to numerical properties only-js-api/src/entities/property-meta.ts:44
propertyOptions.min?publicIProperty & IPropertyAnnotationMinimum value. Applicable to numerical properties only-js-api/src/entities/property-meta.ts:41
propertyOptions.name?publicIProperty & IPropertyAnnotationProperty name-js-api/src/entities/property-meta.ts:16
propertyOptions.nullable?publicIProperty & IPropertyAnnotationWhether an empty value is allowed. This is used by validators.-js-api/src/entities/property-meta.ts:29
propertyOptions.options?publicIProperty & IPropertyAnnotationAdditional options.-js-api/src/entities/property-meta.ts:105
propertyOptions.propertyType?publicIProperty & IPropertyAnnotationProperty data type; same as type, and read first where both appear (as on a DG.Property).-js-api/src/entities/property-meta.ts:22
propertyOptions.semType?publicIProperty & IPropertyAnnotationSemantic type-js-api/src/entities/property-meta.ts:35
propertyOptions.set?publicIProperty & IPropertyAnnotationWrites the property value to an object.-js-api/src/entities/property-meta.ts:83
propertyOptions.showPlusMinus?publicIProperty & IPropertyAnnotationWhether a plus/minus clicker appears next to the number input. Applies to numerical columns only.-js-api/src/entities/property-meta.ts:53
propertyOptions.showSlider?publicIProperty & IPropertyAnnotationWhether a slider appears next to the number input. Applies to numerical columns only.-js-api/src/entities/property-meta.ts:50
propertyOptions.step?publicIProperty & IPropertyAnnotationStep to be used in a slider. Only applies to numerical properties.-js-api/src/entities/property-meta.ts:47
propertyOptions.tags?publicIProperty & IPropertyAnnotation--js-api/src/entities/property-meta.ts:102
propertyOptions.type?publicIProperty & IPropertyAnnotationProperty data type. See TYPE.-js-api/src/entities/property-meta.ts:19
propertyOptions.units?publicIProperty & IPropertyAnnotationUnits of measurement. See also: [postfix]-js-api/src/entities/property-meta.ts:38
propertyOptions.userEditable?publicIProperty & IPropertyAnnotationWhether the property should be editable via the UI-js-api/src/entities/property-meta.ts:115
propertyOptions.validators?publicIProperty & IPropertyAnnotationList of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): stringnull. [null] indicates that the value is valid, [string] describes a validation error.-
propertyOptions.valueValidators?publicIProperty & IPropertyAnnotationList of value validators (functions that take a value and return error message or null)-js-api/src/entities/property-meta.ts:97
propertyOptions.viewer?publicIProperty & IPropertyAnnotation--js-api/src/entities/property-meta.ts:112

Accessors​

caption​

Get Signature​

get caption(): string

Defined in: js-api/src/entities/property.ts:59

Custom field caption shown in the UI. Alias of friendlyName; both stay.

Returns​

string

Set Signature​

set caption(s): void

Defined in: js-api/src/entities/property.ts:60

Custom field caption shown in [PropertyGrid]. Alias of friendlyName; both stay.

Parameters​
ParameterType
sstring
Returns​

void

Custom field caption shown in [PropertyGrid]. Alias of friendlyName; both stay.

Inherited from​

Property.caption


category​

Get Signature​

get category(): string

Defined in: js-api/src/entities/property.ts:67

Property category

Returns​

string

Set Signature​

set category(s): void

Defined in: js-api/src/entities/property.ts:68

Corresponding category on the context panel; groups the property in a property panel.

Parameters​
ParameterType
sstring
Returns​

void

Corresponding category on the context panel; groups the property in a property panel.

Inherited from​

Property.category


choices​

Get Signature​

get choices(): string[]

Defined in: js-api/src/entities/property.ts:159

List of possible values of that property. PropertyGrid will use it to populate combo boxes.

Returns​

string[]

Set Signature​

set choices(x): void

Defined in: js-api/src/entities/property.ts:160

List of choices. Applicable to string properties only

Parameters​
ParameterType
xstring[]
Returns​

void

List of choices. Applicable to string properties only

Inherited from​

Property.choices


columnTypeFilter​

Get Signature​

get columnTypeFilter(): ColumnTypeFilter | null

Defined in: js-api/src/entities/property.ts:174

Column type filter (previously "columnFilter")

Returns​

ColumnTypeFilter | null

Filter for columns, can be numerical, numerical_no_datetime, categorical, datetime, categorical_or_datetime, or directly a column type (string, int...) Applicable when type = Column

Inherited from​

Property.columnTypeFilter


defaultValue​

Get Signature​

get defaultValue(): any

Defined in: js-api/src/entities/property.ts:118

Default value

Returns​

any

Set Signature​

set defaultValue(s): void

Defined in: js-api/src/entities/property.ts:119

Default value used for deserialization and cloning. See also initialValue.

Parameters​
ParameterType
sany
Returns​

void

Default value used for deserialization and cloning. See also initialValue.

Inherited from​

Property.defaultValue


description​

Get Signature​

get description(): string

Defined in: js-api/src/entities/property.ts:101

Description

Returns​

string

Set Signature​

set description(s): void

Defined in: js-api/src/entities/property.ts:102

Property description

Parameters​
ParameterType
sstring
Returns​

void

Property description

Inherited from​

Property.description


editor​

Get Signature​

get editor(): string

Defined in: js-api/src/entities/property.ts:122

Property editor

Returns​

string

Set Signature​

set editor(s): void

Defined in: js-api/src/entities/property.ts:123

Platform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only for the types Dart honors it for (input_base.dart:702-728).

Parameters​
ParameterType
sstring
Returns​

void

Platform editor hint ('textarea', 'password', 'switch', 'slider'), consulted next, and only for the types Dart honors it for (input_base.dart:702-728).

Inherited from​

Property.editor


format​

Get Signature​

get format(): string

Defined in: js-api/src/entities/property.ts:130

Format to be used for displaying the value.

Returns​

string

Set Signature​

set format(s): void

Defined in: js-api/src/entities/property.ts:131

Value format, such as '0.000', applied through DG.format where the platform is loaded.

Parameters​
ParameterType
sstring
Returns​

void

Value format, such as '0.000', applied through DG.format where the platform is loaded.

Inherited from​

Property.format


friendlyName​

Get Signature​

get friendlyName(): string

Defined in: js-api/src/entities/property.ts:63

Custom field caption shown in the UI

Returns​

string

Set Signature​

set friendlyName(s): void

Defined in: js-api/src/entities/property.ts:64

Custom field friendly name shown in [PropertyGrid]

Parameters​
ParameterType
sstring
Returns​

void

Custom field friendly name shown in [PropertyGrid]

Inherited from​

Property.friendlyName


get​

Get Signature​

get get(): PropertyGetter

Defined in: js-api/src/entities/property.ts:47

Property getter is a function that accepts one parameter (item) and returns the property value.

Returns​

PropertyGetter

Set Signature​

set get(x): void

Defined in: js-api/src/entities/property.ts:48

Reads the property value off an object. A property with no set renders read-only.

Parameters​
ParameterType
xPropertyGetter
Returns​

void

Reads the property value off an object. A property with no set renders read-only.

Inherited from​

Property.get


includeInLayout​

Get Signature​

get includeInLayout(): boolean

Defined in: js-api/src/entities/property.ts:89

Applies to viewers properties whether to include the property in the layout or not.

Returns​

boolean

Set Signature​

set includeInLayout(s): void

Defined in: js-api/src/entities/property.ts:90

Parameters​
ParameterType
sboolean
Returns​

void

Inherited from​

Property.includeInLayout


initialValue​

Get Signature​

get initialValue(): string

Defined in: js-api/src/entities/property.ts:114

Initial value used when initializing UI

Returns​

string

Set Signature​

set initialValue(s): void

Defined in: js-api/src/entities/property.ts:115

Initial value used when initializing UI. See also defaultValue

Parameters​
ParameterType
sstring
Returns​

void

Initial value used when initializing UI. See also defaultValue

Inherited from​

Property.initialValue


inputType​

Get Signature​

get inputType(): string

Defined in: js-api/src/entities/property.ts:97

Input type. See also InputType

Returns​

string

Set Signature​

set inputType(s): void

Defined in: js-api/src/entities/property.ts:98

Platform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every other hint, as it does in input_base.dart:668.

Parameters​
ParameterType
sstring
Returns​

void

Platform InputType ('Radio', 'Color', 'Tags'…): the editor named here wins over every other hint, as it does in input_base.dart:668.

Inherited from​

Property.inputType


isOptional​

Get Signature​

get isOptional(): boolean

Defined in: js-api/src/entities/property.ts:110

Whether this function parameter is optional (declared with a default value). What the platform's own call machinery consults; false for non-parameter properties.

Returns​

boolean

Set Signature​

set isOptional(x): void

Defined in: js-api/src/entities/property.ts:111

Parameters​
ParameterType
xboolean
Returns​

void

Inherited from​

Property.isOptional


isVectorizable​

Get Signature​

get isVectorizable(): boolean

Defined in: js-api/src/entities/property.ts:168

Whether a function parameter of this type can accept a whole column.

Returns​

boolean

Inherited from​

Property.isVectorizable


max​

Get Signature​

get max(): number

Defined in: js-api/src/entities/property.ts:142

Maximum value. Used when constructing UI (sliders), validating, etc.

Returns​

number

Set Signature​

set max(s): void

Defined in: js-api/src/entities/property.ts:143

Maximum value. Applicable to numerical properties only

Parameters​
ParameterType
snumber
Returns​

void

Maximum value. Applicable to numerical properties only

Inherited from​

Property.max


min​

Get Signature​

get min(): number

Defined in: js-api/src/entities/property.ts:138

Minimum value. Used when constructing UI (sliders), validating, etc.

Returns​

number

Set Signature​

set min(s): void

Defined in: js-api/src/entities/property.ts:139

Minimum value. Applicable to numerical properties only

Parameters​
ParameterType
snumber
Returns​

void

Minimum value. Applicable to numerical properties only

Inherited from​

Property.min


name​

Get Signature​

get name(): string

Defined in: js-api/src/entities/property.ts:55

Property name

Returns​

string

Set Signature​

set name(s): void

Defined in: js-api/src/entities/property.ts:56

Property name

Parameters​
ParameterType
sstring
Returns​

void

Property name

Inherited from​

Property.name


nullable​

Get Signature​

get nullable(): boolean

Defined in: js-api/src/entities/property.ts:105

Nullable

Returns​

boolean

Set Signature​

set nullable(s): void

Defined in: js-api/src/entities/property.ts:106

Whether an empty value is allowed. This is used by validators.

Parameters​
ParameterType
sboolean
Returns​

void

Whether an empty value is allowed. This is used by validators.

Inherited from​

Property.nullable


propertySubType​

Get Signature​

get propertySubType(): TYPE

Defined in: js-api/src/entities/property.ts:79

Property subtype

Returns​

TYPE

Inherited from​

Property.propertySubType


propertyType​

Get Signature​

get propertyType(): TYPE

Defined in: js-api/src/entities/property.ts:75

Property type. Same as type

Returns​

TYPE

Set Signature​

set propertyType(s): void

Defined in: js-api/src/entities/property.ts:76

Property data type; same as type, and read first where both appear (as on a DG.Property).

Parameters​
ParameterType
sTYPE
Returns​

void

Property data type; same as type, and read first where both appear (as on a DG.Property).

Inherited from​

Property.propertyType


refType​

Get Signature​

get refType(): string | null

Defined in: js-api/src/entities/property.ts:82

Type this property points at ('User'), or null when it holds a plain value.

Returns​

string | null

Inherited from​

Property.refType


relationKind​

Get Signature​

get relationKind(): RELATION_KIND | null

Defined in: js-api/src/entities/property.ts:86

How the property relates to its owner in the database (RELATION_KIND) — null when it carries no database annotation, and is therefore not filterable.

Returns​

RELATION_KIND | null

Inherited from​

Property.relationKind


semType​

Get Signature​

get semType(): string

Defined in: js-api/src/entities/property.ts:93

Semantic type

Returns​

string

Set Signature​

set semType(s): void

Defined in: js-api/src/entities/property.ts:94

Semantic type

Parameters​
ParameterType
sstring
Returns​

void

Semantic type

Inherited from​

Property.semType


set​

Get Signature​

get set(): PropertySetter

Defined in: js-api/src/entities/property.ts:51

Property setter

Returns​

PropertySetter

Set Signature​

set set(x): void

Defined in: js-api/src/entities/property.ts:52

Writes the property value to an object.

Parameters​
ParameterType
xPropertySetter
Returns​

void

Writes the property value to an object.

Inherited from​

Property.set


showPlusMinus​

Get Signature​

get showPlusMinus(): boolean

Defined in: js-api/src/entities/property.ts:154

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Returns​

boolean

Set Signature​

set showPlusMinus(s): void

Defined in: js-api/src/entities/property.ts:155

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Parameters​
ParameterType
sboolean
Returns​

void

Whether a plus/minus clicker appears next to the number input. Applies to numerical columns only.

Inherited from​

Property.showPlusMinus


showSlider​

Get Signature​

get showSlider(): boolean

Defined in: js-api/src/entities/property.ts:150

Whether a slider appears next to the number input. Applies to numerical columns only.

Returns​

boolean

Set Signature​

set showSlider(s): void

Defined in: js-api/src/entities/property.ts:151

Whether a slider appears next to the number input. Applies to numerical columns only.

Parameters​
ParameterType
sboolean
Returns​

void

Whether a slider appears next to the number input. Applies to numerical columns only.

Inherited from​

Property.showSlider


step​

Get Signature​

get step(): number

Defined in: js-api/src/entities/property.ts:146

Step to be used in a slider. Only applies to numerical properties.

Returns​

number

Set Signature​

set step(s): void

Defined in: js-api/src/entities/property.ts:147

Step to be used in a slider. Only applies to numerical properties.

Parameters​
ParameterType
snumber
Returns​

void

Step to be used in a slider. Only applies to numerical properties.

Inherited from​

Property.step


type​

Get Signature​

get type(): TYPE

Defined in: js-api/src/entities/property.ts:71

Property type. Same as propertyType

Returns​

TYPE

Set Signature​

set type(s): void

Defined in: js-api/src/entities/property.ts:72

Property data type. See TYPE.

Parameters​
ParameterType
sTYPE
Returns​

void

Property data type. See TYPE.

Inherited from​

Property.type


units​

Get Signature​

get units(): string

Defined in: js-api/src/entities/property.ts:126

Units of measurement.

Returns​

string

Set Signature​

set units(s): void

Defined in: js-api/src/entities/property.ts:127

Units of measurement. See also: [postfix]

Parameters​
ParameterType
sstring
Returns​

void

Units of measurement. See also: [postfix]

Inherited from​

Property.units


userEditable​

Get Signature​

get userEditable(): boolean

Defined in: js-api/src/entities/property.ts:134

Whether a user can edit this property from the UI.

Returns​

boolean

Set Signature​

set userEditable(s): void

Defined in: js-api/src/entities/property.ts:135

Whether the property should be editable via the UI

Parameters​
ParameterType
sboolean
Returns​

void

Whether the property should be editable via the UI

Inherited from​

Property.userEditable


validators​

Get Signature​

get validators(): string[]

Defined in: js-api/src/entities/property.ts:164

Validation conditions to be checked when editing the property. See also PropertyValidator.

Returns​

string[]

Set Signature​

set validators(x): void

Defined in: js-api/src/entities/property.ts:165

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.

Parameters​
ParameterType
xstring[]
Returns​

void

List of validators. It can include [NAMED_VALIDATORS] as well as any pre-defined function names. Signature: validator(x: DG.Type): string | null. [null] indicates that the value is valid, [string] describes a validation error.

Inherited from​

Property.validators


vectorName​

Get Signature​

get vectorName(): string

Defined in: js-api/src/entities/property.ts:171

Name of the vector (column) counterpart of this parameter.

Returns​

string

Inherited from​

Property.vectorName

Methods​

fromOptions()​

fromOptions(opt?): Property

Defined in: js-api/src/entities/property.ts:179

Applies the specified options

Parameters​

ParameterType
opt?IProperty

Returns​

Property

Inherited from​

Property.fromOptions


bool()​

static bool(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:209

Creates a bool property

Parameters​

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns​

Property

Inherited from​

Property.bool


create()​

static create(name, type): EntityProperty

Defined in: js-api/src/entities/property.ts:284

Creates a property

Parameters​

ParameterType
namestring
typestring

Returns​

EntityProperty

Overrides​

Property.create


dateTime()​

static dateTime(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:214

Creates a datetime property

Parameters​

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns​

Property

Inherited from​

Property.dateTime


float()​

static float(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:199

Creates a float property

Parameters​

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns​

Property

Inherited from​

Property.float


fromOptions()​

static fromOptions(options): Property

Defined in: js-api/src/entities/property.ts:238

Parameters​

ParameterType
optionsIProperty

Returns​

Property

Inherited from​

Property.fromOptions


int()​

static int(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:194

Creates an integer property

Parameters​

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns​

Property

Inherited from​

Property.int


js()​

static js(name, type, options?): Property

Defined in: js-api/src/entities/property.ts:219

Creates property for the JavaScript objects with the corresponding property name

Parameters​

ParameterType
namestring
typeTYPE
options?IProperty

Returns​

Property

Inherited from​

Property.js


jsBool()​

static jsBool(name, options?): Property

Defined in: js-api/src/entities/property.ts:230

Boolean property backed by the JavaScript field [name].

Parameters​

ParameterType
namestring
options?IProperty

Returns​

Property

Inherited from​

Property.jsBool


jsDateTime()​

static jsDateTime(name, options?): Property

Defined in: js-api/src/entities/property.ts:236

Datetime property backed by the JavaScript field [name].

Parameters​

ParameterType
namestring
options?IProperty

Returns​

Property

Inherited from​

Property.jsDateTime


jsFloat()​

static jsFloat(name, options?): Property

Defined in: js-api/src/entities/property.ts:232

Float property backed by the JavaScript field [name].

Parameters​

ParameterType
namestring
options?IProperty

Returns​

Property

Inherited from​

Property.jsFloat


jsInt()​

static jsInt(name, options?): Property

Defined in: js-api/src/entities/property.ts:228

Integer property backed by the JavaScript field [name].

Parameters​

ParameterType
namestring
options?IProperty

Returns​

Property

Inherited from​

Property.jsInt


jsString()​

static jsString(name, options?): Property

Defined in: js-api/src/entities/property.ts:234

String property backed by the JavaScript field [name].

Parameters​

ParameterType
namestring
options?IProperty

Returns​

Property

Inherited from​

Property.jsString


registerAttachedProperty()​

static registerAttachedProperty(typeName, property): void

Defined in: js-api/src/entities/property.ts:243

Registers the attached (dynamic) property for the specified type. It is editable via the context panel, and gets saved into the view layout as well. Property getter/setter typically uses Widget's "temp" property for storing the value.

Parameters​

ParameterType
typeNamestring
propertyProperty

Returns​

void

Inherited from​

Property.registerAttachedProperty


string()​

static string(name, getter, setter, defaultValue): Property

Defined in: js-api/src/entities/property.ts:204

Creates a string property

Parameters​

ParameterType
namestring
getterPropertyGetter
setterPropertySetter
defaultValueany

Returns​

Property

Inherited from​

Property.string