aem-forms-af-runtime

Class: BaseNode<T>

Defines a generic base class which all objects of form runtime model should extend from.

Type parameters

Name Type Description
T extends BaseJson type of the form object which extends from base type

Hierarchy

Implements

Table of contents

Accessors

Properties

Methods

Accessors

:type

get :type(): string

Custom widget type show to the user for capturing the data.

Returns

string

Implementation of

BaseModel.:type


dataRef

get dataRef(): undefined | null | string

To map the field’s value to a property in the data model.

Returns

undefined | null | string

Implementation of

BaseModel.dataRef


description

get description(): undefined | string

Extra description to be shown to the user to aid in form filling experience. It can be rich text.

Returns

undefined | string

Implementation of

BaseModel.description

set description(d): void

Extra description to be shown to the user to aid in form filling experience. It can be rich text.

Parameters

Name Type
d undefined | string

Returns

void

Implementation of

BaseModel.description


fieldType

get fieldType(): string

Type of field to capture the user data.

Returns

string

Implementation of

BaseModel.fieldType


form

get form(): FormModel

Returns

FormModel


fragment

get fragment(): string

Returns

string

Implementation of

BaseModel.fragment


id

get id(): string

Unique id of the form field.

Returns

string

Implementation of

BaseModel.id


index

get index(): number

The index of the Field within its parent.

Returns

number

Implementation of

BaseModel.index


isContainer

get isContainer(): boolean

Whether the form field is container or not

Returns

boolean

Implementation of

BaseModel.isContainer


label

get label(): undefined | Label

Label to be used for the field.

Returns

undefined | Label

Implementation of

BaseModel.label

set label(l): void

Label to be used for the field.

Parameters

Name Type
l undefined | Label

Returns

void

Implementation of

BaseModel.label


lang

get lang(): undefined | string

language of the field

Returns

undefined | string

Implementation of

BaseModel.lang


name

get name(): undefined | string

Name of the form field.

Returns

undefined | string

Implementation of

BaseModel.name


parent

get parent(): ContainerModel

The Parent Panel of the Field/Panel.

Returns

ContainerModel

Implementation of

BaseModel.parent


properties

get properties(): Object

Custom properties of the form field.

Returns

Object

Implementation of

BaseModel.properties

set properties(p): void

Custom properties of the form field.

Parameters

Name Type
p Object

Returns

void

Implementation of

BaseModel.properties


qualifiedName

get qualifiedName(): any

Returns

any

Implementation of

BaseModel.qualifiedName


repeatable

get repeatable(): any

Field is repeatable or not

Returns

any

Implementation of

BaseModel.repeatable


ruleEngine

get ruleEngine(): RuleEngine

Returns

RuleEngine


screenReaderText

get screenReaderText(): undefined | string

Returns

undefined | string


type

get type(): undefined | string

Returns

undefined | string

Implementation of

BaseModel.type


uniqueItems

get uniqueItems(): undefined | boolean

Returns

undefined | boolean

Implementation of

BaseModel.uniqueItems


visible

get visible(): undefined | boolean

Whether the field should be visible to author or not.

Returns

undefined | boolean

Implementation of

BaseModel.visible

set visible(v): void

Whether the field should be visible to author or not.

Parameters

Name Type
v undefined | boolean

Returns

void

Implementation of

BaseModel.visible

Properties

_eventSource

_eventSource: EventSource = EventSource.CODE

Implementation of

BaseModel._eventSource


value

Abstract value: Primitives

The current value of the Field. The property is serialized in the Data Model.

Implementation of

BaseModel.value

Methods

defaultDataModel

Abstract defaultDataModel(name): undefined | default

Parameters

Name Type
name string | number

Returns

undefined | default


dispatch

dispatch(action): void

Parameters

Name Type
action Action

Returns

void

Implementation of

BaseModel.dispatch


executeAction

Abstract executeAction(action): any

Parameters

Name Type
action Action

Returns

any


focus

focus(): void

Returns

void


getDependents

getDependents(): string[]

Returns

string[]


getNonTransparentParent

getNonTransparentParent(): ContainerModel

Returns

ContainerModel


getState

getState(forRestore?): T & { :type: string ; _dependents: undefined | string[] ; allowedComponents: undefined = undefined; columnClassNames: undefined = undefined; columnCount: undefined = undefined; gridClassNames: undefined = undefined; id: string ; index: number ; maxOccur: undefined | number ; minOccur: undefined | number ; parent: undefined = undefined; properties: { [key: string]: any; } ; qualifiedName: any ; repeatable: undefined | boolean = true }

Parameters

Name Type Default value
forRestore boolean false

Returns

T & { :type: string ; _dependents: undefined | string[] ; allowedComponents: undefined = undefined; columnClassNames: undefined = undefined; columnCount: undefined = undefined; gridClassNames: undefined = undefined; id: string ; index: number ; maxOccur: undefined | number ; minOccur: undefined | number ; parent: undefined = undefined; properties: { [key: string]: any; } ; qualifiedName: any ; repeatable: undefined | boolean = true }


isTransparent

isTransparent(): boolean

Transparent form fields are meant only for creation of view. They are also not part of data

Returns

boolean


reset

Abstract reset(): any

Resets the form model

Returns

any

Implementation of

BaseModel.reset


syncDataAndFormModel

Abstract syncDataAndFormModel(a?): any

Parameters

Name Type
a? default | default

Returns

any

Implementation of

BaseModel.syncDataAndFormModel


validate

Abstract validate(): ValidationError[]

Validates the given form field

Returns

ValidationError[]

Implementation of

BaseModel.validate