This mixin should be used by any text box type form control that wants to perform validation
on each key press rather than waiting for focus to move away from the form control.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Members
-
__oldValue :string
-
This is used as a temporary buffer variable to keep track of changes to the old value.
Type:
- string
- Default Value:
- null
- Source:
-
_oldValue :string
-
This will be set to the last known value of the text box before the current keyup event.
Type:
- string
- Default Value:
- null
- Source:
-
publishTopicOnEnter :string
-
The topic to publish on when the ENTER key is pressed (optional).
Type:
- string
- Since:
- 1.0.49
- Default Value:
- module:alfresco/core/topics#ENTER_KEY_PRESSED
- Source:
Methods
-
fireChangeEvent(name, oldValue, newValue)
-
Fires a change event if necessary.
Parameters:
Name Type Description name
string The name of the changing property oldValue
* The old value newValue
* The new value - Since:
- 1.0.49
- Source:
-
handleKeyUp(evt)
-
Handle key-up events.
Parameters:
Name Type Description evt
object Dojo-normalised event object - Since:
- 1.0.49
- Source:
-
setupChangeEvents()
-
Overrides the default change events to use blur events on the text box. This is done so that we can validate on every single keypress. However, we need to keep track of old values as this information is not readily available from the text box itself.