- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dojo/_TemplatedMixin
- module:alfresco/core/CoreWidgetProcessing
- module:alfresco/core/Core
Members
-
cssRequirements :Array
-
An array of the CSS files to use with this widget.
Type:
- Array
-
elementConfig
-
The element configuration should be passed as a construction argument. It should provide a key and a value to use for rendering the element.
- Default Value:
- null
- Source:
-
form :object
-
A reference to the form widget that will be used to hold the controls for configuring the rule definition.
Type:
- object
- Default Value:
- null
- Source:
-
i18nRequirements :Array
-
An array of the i18n files to use with this widget.
Type:
- Array
-
readDisplayAttribute :string
-
The attribute to use from the value as the read only display. Defaults to "value".
Type:
- string
- Default Value:
- "value"
- Source:
-
templateString :String
-
The HTML template to use for the widget.
Type:
- String
Methods
-
constructor()
-
createEditDisplay()
-
Creates a text box to capture the element value
-
createReadDisplay()
-
The default read display simply shows the value of the element.
-
determineKeyAndValue()
-
This is the default function for determining the unique key to identify the element amongst its peers. This function will most likely need to be overridden by extending classes that handle more complex data types.
-
editMode(switchToEdit, saveChanges)
-
Switches the visibility of the edit and read displays.
Parameters:
Name Type Description switchToEdit
boolean Indicates whether or not to switch into edit mode saveChanges
boolean Indicates whether or not state changes should be saved. -
getFormWidgets() → {object[]}
-
Returns the widgets to be used in the form created for edit mode.
Returns:
- Type
- object[]
-
getValue() → {object}
-
Returns:
- Type
- object
-
postCreate()
-
Calls the createReadDisplay and createEditDisplay functions to setup the edit and read modes for the element. Those functions should be overridden directly to alter the appearance of the element.
-
setFormValue()
-
Sets the value of the internal form.
-
validate() → {boolean}
-
Calls the "validate" function on form (if it exists) and returns the result.
Returns:
- Type
- boolean