Show:

A base class for Tabs Data Editor.

Constructor

A.TabsDataEditor

(
  • config
)

Parameters:

  • config Object

    Object literal specifying widget configuration properties.

Methods

_afterEditedValueChange

() protected

Fired after the editedValue attribute is set.

_afterLabelChange

() protected

<p>Fired after the <code>label</code> attribute is set.</p>

_afterRequiredChange

() protected

<p>Fired after the <code>required</code> attribute is set.</p>

_afterTabViewSelectionChange

(
  • event
)
protected

Fires after the selectionChange event from the tab view is triggered.

Parameters:

_afterVisibleChange

() protected

<p>Fired after the <code>visible</code> attribute is set.</p>

_createTabView

() Node protected

Creates the A.TabView widget that will handle this editor's tabs.

Returns:

Node:

_findTabIndexForValue

(
  • value
)
Number

Looks for a tab that is represented by the given value and returns its index on the tab view.

Parameters:

  • value String

Returns:

_getTabView

() A.TabView protected

Returns the A.TabView widget that handles this editor's tabs, creating it if it hasn't been created yet.

Returns:

_uiSetEditedValue

(
  • value
)
protected

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

Parameters:

  • value String

_uiSetLabel

(
  • label
)
protected

<p>Updates the ui according to the value of the <code>label</code> attribute.</p>

Parameters:

  • label String

_uiSetRequired

(
  • required
)
protected

<p>Updates the ui according to the value of the <code>required</code> attribute.</p>

Parameters:

  • required Object

_uiSetVisible

(
  • visible
)
protected

<p>Updates the ui according to the value of the <code>visible</code> attribute.</p>

Parameters:

  • visible Object

destructor

() protected

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

initializer

() protected

Constructor for the A.TabsDataEditor. Lifecycle.

isEmpty

()

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

isValid

() Boolean

<p>If the data editor is required and empty this will return false.</p>

Returns:

Boolean:

Properties

ATTRS

Object static

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

Attributes

editedValue

String

The value after edition.

Default: ''

label

String

<p>The label to be used by this boolean editor.</p>

Default: ''

node

Node

<p>The node where the editor UI is rendered.</p>

originalValue

String

The value to be edited.

Default: ''

required

<p>Defines if the data editor is required or not.</p>

Default: false

strings

Object

<p>Collection of strings used to label elements of the UI.</p>

tabs

Array

Information about each tab that this editor should show as an option. Each tab should be an object representing with the following keys: label -> Text that will be shown for the tab panelNode (Optional) -> Content that should show up when the tab is selected. value -> Value that represents the tab. Will be set as editedValue when the tab is selected.

Default: []

visible

Boolean

<p>Determines if <code>DataEditor</code> is visible or not.</p>

Default: false