Class: Form
Represents a form that is rendered in Viewer or edited in Builder.
Implements
Constructors
Constructor
new Form(
componentTree,localization,actions,languages,defaultLanguage):Form
Creates a new instance of Form.
Parameters
componentTree
the root component of the form.
localization
the localization of the form.
actions
the form custom actions.
languages
Language[]
the localization languages of the form.
defaultLanguage
the default localization language of the form.
Returns
Form
Properties
actions
readonlyactions:ActionValues
The set of action definitions.
componentTree
readonlycomponentTree:ComponentData
Root component of the form.
defaultLanguage
defaultLanguage:
Language
Default localization language of the form.
Implementation of
errorProps
errorProps:
any={}
Properties of the component displaying the error.
errorType?
optionalerrorType:string
The type name of the component displaying the error.
formValidator?
optionalformValidator:string
The form validator.
languages
readonlylanguages:Language[] =[]
Localization languages of the form.
localization
readonlylocalization:LocalizationStore
Localization of the form.
Implementation of
modalType?
optionalmodalType:string
The type name of the component displaying the modal.
tooltipType?
optionaltooltipType:string
The type name of the component displaying the tooltip.
Accessors
actionNames
Get Signature
get actionNames():
string[]
Returns
string[]
the actions names array.
formValidatorFunction
Get Signature
get formValidatorFunction():
undefined|FormValidator
Returns
undefined | FormValidator
the form validator function.
Methods
cloneAction()
cloneAction(
namedAction):void
Clones the action.
Parameters
namedAction
the named action to clone.
Returns
void
dispose()
dispose():
void
Disposes the form. Disposes all the components and localization.
Returns
void
initFields()
initFields():
void
Initializes form fields.
Returns
void
removeAction()
removeAction(
name):void
Removes the action from the form.
Parameters
name
string
the action name to remove.
Returns
void
updateOrAddAction()
updateOrAddAction(
oldActionName,newAction):void
Changes the existing action to the new one, adds the action if the existing action is not found.
Parameters
oldActionName
string
the existing action name.
newAction
the new named action.
Returns
void