Show:

A base class for Boolean Data Editor.

Constructor

A.BooleanDataEditor

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterButtonSwitchActivatedChange

(
  • event
)
protected

Fired after the checkbox is clicked.

Parameters:

_afterCheckedContentChange

() protected

Fired after the checkedContent attribute is set.

_afterEditedValueChange

(
  • event
)
protected

Fired after the editedValue attribute is set.

Parameters:

_afterInnerLabelLeftChange

(
  • event
)
protected

Fired after the innerLabelLeft attribute is set.

Parameters:

_afterInnerLabelRightChange

(
  • event
)
protected

Fired after the innerLabelRight attribute is set.

Parameters:

_afterLabelChange

() protected

Fired after the label attribute is set.

_afterRequiredChange

() protected

Fired after the required attribute is set.

_afterUncheckedContentChange

() protected

Fired after the uncheckedContent attribute is set.

_afterVisibleChange

() protected

Fired after the visible attribute is set.

_createSwitchButton

() Object protected

Returns the switch button instance.

Returns:

Object:

_setContent

(
  • val
)
Node protected

Sets content attributes like checkedContent and uncheckedContent.

Parameters:

Returns:

Node:

_uiSetEditedValue

(
  • editedValue
)
protected

Updates the ui according to the value of the editedValue attribute.

Parameters:

  • editedValue Object

_uiSetLabel

(
  • label
)
protected

Updates the ui according to the value of the label attribute.

Parameters:

  • label String

_uiSetRequired

(
  • required
)
protected

Updates the ui according to the value of the required attribute.

Parameters:

  • required Object

_uiSetVisible

(
  • visible
)
protected

Updates the ui according to the value of the visible attribute.

Parameters:

  • visible Object

_updateContent

() protected

Updates the boolean data editor with the given content.

_validateContent

(
  • val
)
Boolean protected

Validates content attributes like checkedContent and uncheckedContent.

Parameters:

  • val

Returns:

Boolean:

destructor

() protected

Destructor lifecycle implementation for the A.DataEditor class. Lifecycle.

initializer

() protected

Constructor for the A.BooleanDataEditor. Lifecycle.

isEmpty

()

Returns true if this edited value has no elements. This should be overridden by subclasses, otherwise it always returns false.

isValid

() Boolean

If the data editor is required and empty this will return false.

Returns:

Boolean:

Properties

ATTRS

Object static

Static property used to define the default attribute configuration for the A.BooleanDataEditor.

Attributes

checkedContent

String | Node

Optional content that should show up when the data editor is in the checked state.

Default: null

editedValue

Boolean

The value after edition.

Default: false

innerLabelLeft

String

The label to be used on button left side.

innerLabelRight

String

The label to be used on button right side.

label

String

The label to be used by this boolean editor.

Default: ''

node

Node

The node where the editor UI is rendered.

originalValue

Boolean

The value to be edited.

Default: false

required

Defines if the data editor is required or not.

Default: false

strings

Object

Collection of strings used to label elements of the UI.

uncheckedContent

String | Node

Optional content that should show up when the data editor is in the unchecked state.

Default: null

visible

Boolean

Determines if DataEditor is visible or not.

Default: false