A.FormBuilderFieldChoice Class
Parent Module: aui-form-builder
A base class for Form Builder Field Choice.
Constructor
A.FormBuilderFieldChoice
-
config
Parameters:
-
config
ObjectObject literal specifying widget configuration properties.
Index
Methods
- _afterAdvancedSettingsChange
- _afterExpandedChange
- _afterHelpChange
- _afterNestedFieldsChange
- _afterOptionsChange
- _afterOtherOptionChange
- _afterTitleChange
- _afterTypeChange
- _attachEvent
- _attachEvents
- _cleanOptionsContainer
- _createAdvancedSettingsToggler
- _createMoveTarget
- _createOptionNode
- _detachEvents
- _dispatchEvent
- _fillAdvancedSettings
- _fillSettings
- _fireEvent
- _getAdvancedSettings
- _getEventName
- _getFormClass
- _getNodeName
- _getSettings
- _hasParent
- _prepareHandles
- _setFormType
- _toggleVisibilityOfModalContent
- _uiSetHelp
- _uiSetNestedFields
- _uiSetOptions
- _uiSetOtherOption
- _uiSetTitle
- _uiSetType
- _updateAdvancedSettingsChange
- _updateOptionsContainer
- _validateNestedFields
- addNestedField
- collapseModalContent
- delegate
- destructor
- detach
- detachDelegate
- hasModifier
- initializer
- isKey
- isKeyInRange
- isKeyInSet
- isModifyingKey
- isNavKey
- isSpecialKey
- on
- removeNestedField
- renderAdvancedSettings
- renderBasicSettings
- renderSetting
- renderSettingsPanel
- renderUI
- saveSettings
- validateSettings
Attributes
Events
Methods
_afterAdvancedSettingsChange
()
protected
<p>Fired after the a advanced settings change.</p>
_afterExpandedChange
-
event
<p>Fired after the a Toggler of Advanced Settings change.</p>
Parameters:
-
event
EventFacade
_afterHelpChange
()
protected
Fired after the help
attribute is set.
_afterNestedFieldsChange
()
protected
Fired after the nestedFields
attribute is set.
_afterOptionsChange
()
protected
Fired after the options
attribute is set.
_afterOtherOptionChange
()
protected
Fired after the otherOption
attribute is set.
_afterTitleChange
()
protected
Fired after the title
attribute is set.
_afterTypeChange
()
protected
Fired after the type
attribute is set.
_attachEvent
-
node
-
subscription
-
notifier
-
delegateNode
-
filter
<p>Adds an event subscription.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object -
delegateNode
Object -
filter
Object
_attachEvents
-
node
-
subscription
-
notifier
-
filter
<p>Adds an event subscription.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object -
filter
Object
_cleanOptionsContainer
()
protected
Remove all option element from ui.
_createAdvancedSettingsToggler
()
protected
<p>Create a Toggler with the advanced settings.</p>
_createMoveTarget
-
position
<p>Creates a move target node.</p>
Parameters:
-
position
Number<p>The position where the moved field will be added if this is the chosen target.</p>
Returns:
_createOptionNode
-
optionLabel
Create a option node.
Parameters:
-
optionLabel
String
Returns:
A new Option Node
_detachEvents
-
node
-
subscription
-
notifier
<p>Deletes a group of event subscriptions.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object
_dispatchEvent
-
subscription
-
notifier
-
event
<p>Dispatches an <code>input</code> event.</p>
Parameters:
-
subscription
Object -
notifier
Object -
event
Object
_fillAdvancedSettings
()
protected
Fills the advanced settings array with the information for this field.
_fillSettings
()
protected
Fills the settings array with the information for this field.
_fireEvent
-
subscription
-
notifier
-
event
-
valueBeforeKey
<p>Fires an event.</p>
Parameters:
-
subscription
Object -
notifier
Object -
event
Object -
valueBeforeKey
Object
_getAdvancedSettings
()
Array
protected
<p>Gets the list of advanced settings for this field.</p>
Returns:
_getEventName
()
protected
<p>Gets an event name.</p>
_getFormClass
-
type
Gets the appropriate css class to form for the given type.
Parameters:
-
type
String
Returns:
_getNodeName
-
elem
-
name
<p>Gets a node name.</p>
Parameters:
-
elem
Object -
name
Object
_getSettings
()
Array
protected
<p>Gets the list of settings for this field. Safer then calling the property directly, as this will lazy load the settings if they're not ready yet. Each setting should be an object with the following keys: attrName and editor.</p>
Returns:
_hasParent
-
node
-
testParentNode
<p>Checks if a node has parent.</p>
Parameters:
-
node
Object -
testParentNode
Object
_prepareHandles
-
subscription
-
node
<p>Prepares event handles.</p>
Parameters:
-
subscription
Object -
node
Object
_setFormType
-
type
Switch option type between radio and checkbox.
Parameters:
-
type
String
_toggleVisibilityOfModalContent
()
protected
<p>Toggle visibility classes on Modal Content.</p>
_uiSetHelp
-
help
Updates the ui according to the value of the help
attribute.
Parameters:
-
help
String
_uiSetNestedFields
-
nestedFields
<p>Updates the UI according to the value of the <code>nestedFields</code> attribute.</p>
Parameters:
-
nestedFields
Array
_uiSetOptions
-
options
Updates the ui according to the value of the options
attribute.
Parameters:
-
options
Array
_uiSetOtherOption
-
otherOption
Updates the ui according to the value of the otherOption
attribute.
Parameters:
-
otherOption
Boolean
_uiSetTitle
-
title
Updates the ui according to the value of the title
attribute.
Parameters:
-
title
String
_uiSetType
-
type
Updates the ui according to the value of the type
attribute.
Parameters:
-
type
String
_updateAdvancedSettingsChange
()
protected
<p>Updates the UI according to the values of the Advanced Settings.</p>
_updateOptionsContainer
()
protected
Set a new options container based on type
attribute.
_validateNestedFields
-
val
Validates the value being set to the nestedFields
attribute.
Parameters:
-
val
Array
addNestedField
-
index
-
field
Adds the given field to this field's nested list.
Parameters:
-
index
Number -
field
A.FormField
collapseModalContent
()
<p>Collapse Advanced Settings Content.</p>
delegate
-
node
-
subscription
-
notifier
-
filter
<p>Implementation logic for subscription via <code>node.delegate</code>.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object -
filter
Object
destructor
()
protected
Destructor lifecycle implementation for the A.FormField
class.
Lifecycle.
detach
-
node
-
subscription
-
notifier
<p>Implementation logic for cleaning up a detached subscription.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object
detachDelegate
-
node
-
subscription
-
notifier
<p>Implementation logic for cleaning up a detached delegate subscription.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object
hasModifier
()
Boolean
<p>Checks if an event is triggered by a keyboard key like <code>CTRL</code>, <code>ALT</code> or <code>SHIFT</code>.</p>
Returns:
initializer
()
protected
<p>Constructor for the <code>A.FormBuilderFieldBase</code> component. Lifecycle.</p>
isKey
-
name
<p>Checks if an event is triggered by a keyboard key.</p>
Parameters:
-
name
Object
Returns:
isKeyInRange
-
start
-
end
<p>Checks if an event is triggered by a keyboard key located between two other keys.</p>
Parameters:
-
start
Object -
end
Object
Returns:
isKeyInSet
()
Boolean
<p>Checks if an event is triggered by a keyboard key contained in the key set.</p>
Returns:
isModifyingKey
()
<p>Checks if an event is triggered by <code>ENTER</code>, <code>TAB</code>, <code>ESC</code> keyboard keys or by a key located between <code>PAGE UP</code> and <code>DOWN</code>.</p>
isSpecialKey
()
Boolean
<p>Checks if an event is triggered by a special keyboard key like <code>SHIFT</code>, <code>CAPS LOCK</code>, etc.</p>
Returns:
on
-
node
-
subscription
-
notifier
<p>Implementation logic for event subscription.</p>
Parameters:
-
node
Object -
subscription
Object -
notifier
Object
removeNestedField
-
field
Removes the given field from this field's nested list.
Parameters:
-
field
A.FormField
renderAdvancedSettings
()
<p>Renders the advanced settings on panel.</p>
renderBasicSettings
()
<p>Renders the basic settings on panel.</p>
renderSetting
-
setting
-
targetNode
<p>Renders a single field setting to be edited.</p>
Parameters:
-
setting
Object -
targetNode
Node
renderSettingsPanel
-
container
<p>Renders the settings panel.</p>
Parameters:
-
container
Node<p>The container where the panel should be rendered.</p>
renderUI
()
protected
Create the DOM structure for the A.FormFieldChoice
. Lifecycle.
saveSettings
()
<p>Saves the edited settings.</p>
validateSettings
()
Boolean
<p>Validates all data editors used by this field's settings.</p>
Returns:
Attributes
Events
change
<p>Defines a new <code>change</code> event in the DOM event system.</p>
contentToggle
<p>Fired when toggle the modal content.</p>
input
<p>Defines a new <code>input</code> event in the DOM event system.</p>
submit
<p>Defines a new <code>submit</code> event in the DOM event system.</p>