aem-forms-af-runtime

Class: FileUpload

Implementation of FileUpload runtime model which extends from field

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

FieldModel.:type

Inherited from

Field.:type


accept

get accept(): undefined | string[]

Returns the list of mime types which file attachment can accept

Returns

undefined | string[]

Implementation of

FieldModel.accept


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

FieldModel.dataRef

Inherited from

Field.dataRef


default

get default(): any

Default value of the Field.

Returns

any

Implementation of

FieldModel.default

Inherited from

Field.default


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

FieldModel.description

Inherited from

Field.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

FieldModel.description

Inherited from

Field.description


displayFormat

get displayFormat(): undefined | string

format in which user will see the value after update

Returns

undefined | string

Implementation of

FieldModel.displayFormat

Inherited from

Field.displayFormat


displayValue

get displayValue(): any

value to be displayed to the user after update

Returns

any

Implementation of

FieldModel.displayValue

Inherited from

Field.displayValue


displayValueExpression

get displayValueExpression(): undefined | string

expression that when evaluated returns the displayValue of a field

Returns

undefined | string

Implementation of

FieldModel.displayValueExpression

Inherited from

Field.displayValueExpression


editFormat

get editFormat(): undefined | string

format in which user will edit the value

Returns

undefined | string

Implementation of

FieldModel.editFormat

Inherited from

Field.editFormat


editValue

get editValue(): any

value to be displayed to the user for edit

Returns

any

Implementation of

FieldModel.editValue

Inherited from

Field.editValue


emptyValue

get emptyValue(): undefined | null | ""

Returns

undefined | null | ""

Inherited from

Field.emptyValue


enabled

get enabled(): undefined | boolean

Whether the field is enabled and takes part in rules, events etc.

Returns

undefined | boolean

Implementation of

FieldModel.enabled

Inherited from

Field.enabled

set enabled(e): void

Whether the field is enabled and takes part in rules, events etc.

Parameters

Name Type
e undefined | boolean

Returns

void

Implementation of

FieldModel.enabled

Inherited from

Field.enabled


enforceEnum

get enforceEnum(): undefined | boolean

Returns

undefined | boolean

Implementation of

FieldModel.enforceEnum

Inherited from

Field.enforceEnum


enum

get enum(): undefined | any[]

Returns

undefined | any[]

Implementation of

FieldModel.enum

Inherited from

Field.enum

set enum(e): void

Parameters

Name Type
e undefined | any[]

Returns

void

Implementation of

FieldModel.enum

Inherited from

Field.enum


enumNames

get enumNames(): undefined | string[]

Returns

undefined | string[]

Implementation of

FieldModel.enumNames

Inherited from

Field.enumNames

set enumNames(e): void

Parameters

Name Type
e undefined | string[]

Returns

void

Implementation of

FieldModel.enumNames

Inherited from

Field.enumNames


errorMessage

get errorMessage(): undefined | string

Returns

undefined | string

Inherited from

Field.errorMessage

set errorMessage(e): void

Parameters

Name Type
e undefined | string

Returns

void

Inherited from

Field.errorMessage


exclusiveMaximum

get exclusiveMaximum(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.exclusiveMaximum

Inherited from

Field.exclusiveMaximum

set exclusiveMaximum(eM): void

Parameters

Name Type
eM undefined | number

Returns

void

Implementation of

FieldModel.exclusiveMaximum

Inherited from

Field.exclusiveMaximum


exclusiveMinimum

get exclusiveMinimum(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.exclusiveMinimum

Inherited from

Field.exclusiveMinimum

set exclusiveMinimum(eM): void

Parameters

Name Type
eM undefined | number

Returns

void

Implementation of

FieldModel.exclusiveMinimum

Inherited from

Field.exclusiveMinimum


fieldType

get fieldType(): string

Type of field to capture the user data.

Returns

string

Implementation of

FieldModel.fieldType

Inherited from

Field.fieldType


form

get form(): FormModel

Returns

FormModel

Inherited from

Field.form


format

get format(): undefined | string

returns the format constraint

Returns

undefined | string

Implementation of

FieldModel.format

Inherited from

Field.format


fragment

get fragment(): string

Returns

string

Implementation of

FieldModel.fragment

Inherited from

Field.fragment


id

get id(): string

Unique id of the form field.

Returns

string

Implementation of

FieldModel.id

Inherited from

Field.id


index

get index(): number

The index of the Field within its parent.

Returns

number

Implementation of

FieldModel.index

Inherited from

Field.index


isContainer

get isContainer(): boolean

Whether the form field is container or not

Returns

boolean

Implementation of

FieldModel.isContainer

Inherited from

Field.isContainer


label

get label(): undefined | Label

Label to be used for the field.

Returns

undefined | Label

Implementation of

FieldModel.label

Inherited from

Field.label

set label(l): void

Label to be used for the field.

Parameters

Name Type
l undefined | Label

Returns

void

Implementation of

FieldModel.label

Inherited from

Field.label


lang

get lang(): undefined | string

language of the field

Returns

undefined | string

Implementation of

FieldModel.lang

Inherited from

Field.lang


maxFileSize

get maxFileSize(): number

Returns the max file size in bytes as per IEC specification

Returns

number

Implementation of

FieldModel.maxFileSize


maxLength

get maxLength(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.maxLength

Inherited from

Field.maxLength


maximum

get maximum(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.maximum

Inherited from

Field.maximum

set maximum(m): void

Parameters

Name Type
m undefined | number

Returns

void

Implementation of

FieldModel.maximum

Inherited from

Field.maximum


minLength

get minLength(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.minLength

Inherited from

Field.minLength


minimum

get minimum(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.minimum

Inherited from

Field.minimum

set minimum(m): void

Parameters

Name Type
m undefined | number

Returns

void

Implementation of

FieldModel.minimum

Inherited from

Field.minimum


name

get name(): undefined | string

Name of the form field.

Returns

undefined | string

Implementation of

FieldModel.name

Inherited from

Field.name


parent

get parent(): ContainerModel

Parent of the current field

Returns

ContainerModel

Implementation of

FieldModel.parent

Inherited from

Field.parent


pattern

get pattern(): undefined | string

Returns

undefined | string

Implementation of

FieldModel.pattern

Inherited from

Field.pattern


placeholder

get placeholder(): undefined | string

The placeholder to show on the widget.

Returns

undefined | string

Implementation of

FieldModel.placeholder

Inherited from

Field.placeholder


properties

get properties(): Object

Custom properties of the form field.

Returns

Object

Implementation of

FieldModel.properties

Inherited from

Field.properties

set properties(p): void

Custom properties of the form field.

Parameters

Name Type
p Object

Returns

void

Implementation of

FieldModel.properties

Inherited from

Field.properties


qualifiedName

get qualifiedName(): any

Returns

any

Implementation of

FieldModel.qualifiedName

Inherited from

Field.qualifiedName


readOnly

get readOnly(): undefined | boolean

Whether the field should be readOnly to end user or not.

Returns

undefined | boolean

Implementation of

FieldModel.readOnly

Inherited from

Field.readOnly

set readOnly(e): void

Whether the field should be readOnly to end user or not.

Parameters

Name Type
e undefined | boolean

Returns

void

Implementation of

FieldModel.readOnly

Inherited from

Field.readOnly


repeatable

get repeatable(): any

Field is repeatable or not

Returns

any

Implementation of

FieldModel.repeatable

Inherited from

Field.repeatable


required

get required(): boolean

Returns

boolean

Implementation of

FieldModel.required

Inherited from

Field.required

set required(r): void

Parameters

Name Type
r boolean

Returns

void

Implementation of

FieldModel.required

Inherited from

Field.required


ruleEngine

get ruleEngine(): RuleEngine

Returns

RuleEngine

Implementation of

FieldModel.ruleEngine

Inherited from

Field.ruleEngine


screenReaderText

get screenReaderText(): undefined | string

Returns

undefined | string

Inherited from

Field.screenReaderText


step

get step(): undefined | number

Returns

undefined | number

Implementation of

FieldModel.step

Inherited from

Field.step


tooltip

get tooltip(): undefined | string

Returns

undefined | string

Inherited from

Field.tooltip


type

get type(): undefined | string

Returns

undefined | string

Implementation of

FieldModel.type

Inherited from

Field.type


uniqueItems

get uniqueItems(): undefined | boolean

Returns

undefined | boolean

Implementation of

FieldModel.uniqueItems

Inherited from

Field.uniqueItems


valid

get valid(): any

The current validation state of the Field. The property is always computed after merging the Data Model with the Form

Returns

any

Implementation of

FieldModel.valid

Inherited from

Field.valid

set valid(e): void

The current validation state of the Field. The property is always computed after merging the Data Model with the Form

Parameters

Name Type
e any

Returns

void

Implementation of

FieldModel.valid

Inherited from

Field.valid


validity

get validity(): any

Returns

any

Inherited from

Field.validity


value

get value(): any

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

Returns

any

Implementation of

FieldModel.value

Inherited from

Field.value

set value(v): void

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

Parameters

Name Type
v any

Returns

void

Implementation of

FieldModel.value

Inherited from

Field.value


visible

get visible(): undefined | boolean

Whether the field should be visible to author or not.

Returns

undefined | boolean

Implementation of

FieldModel.visible

Inherited from

Field.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

FieldModel.visible

Inherited from

Field.visible

Properties

_eventSource

_eventSource: EventSource = EventSource.CODE

Implementation of

FieldModel._eventSource

Inherited from

Field._eventSource

Methods

change

change(event, context): void

Parameters

Name Type
event Action
context any

Returns

void

Inherited from

Field.change


dispatch

dispatch(action): void

Parameters

Name Type
action Action

Returns

void

Implementation of

FieldModel.dispatch

Inherited from

Field.dispatch


executeAction

executeAction(action): void

Executes the given action

Parameters

Name Type Description
action Action event object

Returns

void

Inherited from

Field.executeAction


executeExpression

executeExpression(expr): any

Parameters

Name Type
expr string

Returns

any

Inherited from

Field.executeExpression


focus

focus(): void

Returns

void

Inherited from

Field.focus


getDependents

getDependents(): string[]

Returns

string[]

Inherited from

Field.getDependents


getErrorMessage

getErrorMessage(constraint): string

Returns the error message for a given constraint

Parameters

Name Type
constraint keyof ConstraintsMessages

Returns

string

Inherited from

Field.getErrorMessage


getNonTransparentParent

getNonTransparentParent(): ContainerModel

Returns

ContainerModel

Inherited from

Field.getNonTransparentParent


getRules

getRules(): Items<string>

Returns

Items<string>

Inherited from

Field.getRules


getState

getState(isRepeatableChild?, forRestore?): Object

state of the form object

Parameters

Name Type Default value
isRepeatableChild boolean false
forRestore boolean false

Returns

Object

Name Type
:type string
_dependents undefined | string[]
accept? string[]
allowedComponents undefined
altText? string
appliedCssClassNames? string
buttonType? string
checked? boolean
columnClassNames undefined
columnCount undefined
constraintMessages? ConstraintsMessages
dataRef? null | string
default? any
description? string
displayFormat undefined | string
displayValue any
displayValueExpression? string
editFormat undefined | string
editValue any
emptyValue? "" | "undefined" | "null"
enabled undefined | boolean
enforceEnum? boolean
enum? any[]
enumNames? string[]
errorMessage? string
events? Items<undefined | string | string[]>
exclusiveMaximum? number
exclusiveMinimum? number
fieldType? string
format? string
gridClassNames undefined
id string
index number
label? Label
lang? string
maxFileSize? string | number
maxItems? number
maxLength? number
maxOccur? number
maximum? number
minItems? number
minLength? number
minOccur? number
minimum? number
name? string
parent undefined
pattern? string
placeholder? string
properties { [key: string]: any; }
qualifiedName any
readOnly undefined | boolean
repeatable? boolean
required? boolean
rules? Items<string>
screenReaderText? string
step? number
tooltip? string
type? string
uniqueItems? boolean
valid? boolean
validationExpression? string
validationMessage? string
validity? any
value? any
viewType? string
visible? boolean

Implementation of

FieldModel.getState

Inherited from

Field.getState


isTransparent

isTransparent(): boolean

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

Returns

boolean

Inherited from

Field.isTransparent


markAsInvalid

markAsInvalid(message, constraint?): void

API to mark a particular field as invalid

Parameters

Name Type Default value Description
message string undefined error message
constraint null | keyof ConstraintsMessages null constraint type due to which field is marked invalid. It should be key of ConstraintsMessages or null

Returns

void

Inherited from

Field.markAsInvalid


ruleNodeReference

ruleNodeReference(): any

Returns

any

Implementation of

FieldModel.ruleNodeReference

Inherited from

Field.ruleNodeReference


serialize

serialize(): Promise<null | unknown[]>

Returns

Promise<null | unknown[]>


syncDataAndFormModel

syncDataAndFormModel(dataNode): void

Parameters

Name Type
dataNode default

Returns

void

Implementation of

FieldModel.syncDataAndFormModel

Overrides

Field.syncDataAndFormModel


toString

toString(): any

Returns

any

Inherited from

Field.toString


triggerValidationEvent

triggerValidationEvent(changes): void

Parameters

Name Type
changes any

Returns

void

Inherited from

Field.triggerValidationEvent


validate

validate(): ValidationError[]

Validates the current form object

Returns

ValidationError[]

Implementation of

FieldModel.validate

Inherited from

Field.validate


valueOf

valueOf(): any

Returns

any

Inherited from

Field.valueOf