Class: Control

montage/ui/control. Control

new Control()

Base component for all native components, such as RadioButton and Checkbox.
Source:

Extends

  • module:montage/ui/component.Component

Members

accesskey :string

Specifies the shortcut key(s) that gives focuses to or activates the element.
Type:
  • string
Default Value:
  • null
Source:
See:

actionCompletionPromise

A promise that indicates an action event triggered an asynchronous task. The control will stop listening to user input until actionCompletionPromise is resoved or rejected, and uses CSS classes to represent the Promise resolution
Properties:
Name Type Description
value Promise
Default Value:
  • undefined
Source:

active :boolean

This property is meant to be used as a way to flag when a component is being interacted with, either through mouse or touch event. false by default, specialized components like controls would set it to true when being interacted with.
Type:
  • boolean
Default Value:
  • false
Source:

autofocus :boolean

Specifies if the control should receive focus when the document loads. Because Montage components are loaded asynchronously after the document has loaded, setting this property has no effect on the element's focus state.
Type:
  • boolean
Default Value:
  • false
Source:

contenteditable :string

Specifies if the content is editable or not. Valid values are "true", "false", and "inherit".
Type:
  • string
Default Value:
  • null
Source:
See:

contextmenu :string

Specifies the ID of a menu element in the DOM to use as the element's context menu.
Type:
  • string
Default Value:
  • null
Source:
See:

converter :Converter

A reference to a Converter object whose revert() function is invoked when a new value is assigned to the TextInput object's value property. The revert() function attempts to transform the newly assigned value into a "typed" data property. For instance, a DateInput component could assign a DateConverter object to this property to convert a user-supplied date string into a standard date format.
Type:
Default Value:
  • null
Source:
See:
  • module:montage/core/converter.Converter

detail

The data property of the action event. Example to toggle the complete class: `"detail.get('selectedItem')" : { "<-" : "@repetition:iteration.object"}`
Source:

dir :string

Specifies the elements element's text directionality. Valid values are "ltr", "rtl", and "auto".
Type:
  • string
Default Value:
  • null
Source:
See:

disabled :boolean

Specifies if the control is disabled.
Type:
  • boolean
Default Value:
  • false
Source:

draggable :string

Specifies if the element is draggable. Valid values are "true", "false", and "auto".
Type:
  • string
Default Value:
  • null
Source:
See:

dropzone :string

Specifies the behavior that's taken when an item is dropped on the element. Valid values are "copy", "move", and "link".
Type:
  • string
Source:
See:

elementValue :String

This property is meant to return the value of a control's element. specialized controls can override this to access different DOM properties if needed
Type:
  • String
Source:

error :boolean

If an error is thrown by the converter object during a new value assignment, this property is set to true, and schedules a new draw cycle so the the UI can be updated to indicate the error state. the montage--invalidText CSS class is assigned to the component's DOM element during the next draw cycle.
Type:
  • boolean
Default Value:
  • false
Source:

errorMessage :string

The message to display when the component is in an error state.
Type:
  • string
Default Value:
  • null
Source:

form :string

The value of the id attribute of the form with which to associate the element.
Type:
  • string
Default Value:
  • null
Source:

hidden :boolean

When specified on an element, it indicates that the element should not be displayed.
Type:
  • boolean
Default Value:
  • false
Source:

isContinuous :Object

Returns a Boolean value indicating whether the control dispatched its action event continuously when value changes.
Type:
  • Object
Default Value:
  • false
Source:
See:
  • module:montage/core/converter.Converter

lang :string

Specifies the primary language for the element's contents and for any of the element's attributes that contain text.
Type:
  • string
Default Value:
  • null
Source:
See:

name :string

The name part of the name/value pair associated with this element for the purposes of form submission.
Type:
  • string
Default Value:
  • null
Source:

readonly :boolean

Specifies if this control is readonly.
Type:
  • boolean
Default Value:
  • false
Source:

spellcheck :string

Specifies if element should have its spelling and grammar checked by the browser. Valid values are "true", "false".
Type:
  • string
Default Value:
  • null
Source:
See:

tabindex :number

Specifies the relative order of the element for the purposes of sequential focus navigation.
Type:
  • number
Default Value:
  • null
Source:
See:

title :string

Specifies advisory information about the element, used as a tooltip when hovering over the element, and other purposes.
Type:
  • string
Default Value:
  • null
Source:
See:

Methods

createActionEvent() → {AbstractControl#action}

Overrides Component#createActionEvent by adding AbstractControl#detail custom data
Source:
Returns:
Type
AbstractControl#action

dispatchActionEvent()

Source:
Fires: