Ember.Select Class
The Ember.Select view class renders a
select HTML element,
allowing the user to choose from a list of options.
The text and value property of each <option> element within the
<select> element are populated from the objects in the Element.Select's
content property. The underlying data object of the selected <option> is
stored in the Element.Select's value property.
The Content Property (array of strings)
The simplest version of an Ember.Select takes an array of strings as its
content property. The string will be used as both the value property and
the inner text of each <option> element inside the rendered <select>.
Example:
App.ApplicationController = Ember.ObjectController.extend({
  names: ["Yehuda", "Tom"]
});
{{view Ember.Select content=names}}
Would result in the following HTML:
<select class="ember-select">
  <option value="Yehuda">Yehuda</option>
  <option value="Tom">Tom</option>
</select>
You can control which <option> is selected through the Ember.Select's
value property:
App.ApplicationController = Ember.ObjectController.extend({
  selectedName: 'Tom',
  names: ["Yehuda", "Tom"]
});
{{view Ember.Select
       content=names
       value=selectedName
}}
Would result in the following HTML with the <option> for 'Tom' selected:
<select class="ember-select">
  <option value="Yehuda">Yehuda</option>
  <option value="Tom" selected="selected">Tom</option>
</select>
A user interacting with the rendered <select> to choose "Yehuda" would
update the value of selectedName to "Yehuda".
The Content Property (array of Objects)
An Ember.Select can also take an array of JavaScript or Ember objects as
its content property.
When using objects you need to tell the Ember.Select which property should
be accessed on each object to supply the value attribute of the <option>
and which property should be used to supply the element text.
The optionValuePath option is used to specify the path on each object to
the desired property for the value attribute. The optionLabelPath
specifies the path on each object to the desired property for the
element's text. Both paths must reference each object itself as content:
App.ApplicationController = Ember.ObjectController.extend({
  programmers: [
    {firstName: "Yehuda", id: 1},
    {firstName: "Tom",    id: 2}
  ]
});
{{view Ember.Select
       content=programmers
       optionValuePath="content.id"
       optionLabelPath="content.firstName"}}
Would result in the following HTML:
<select class="ember-select">
  <option value="1">Yehuda</option>
  <option value="2">Tom</option>
</select>
The value attribute of the selected <option> within an Ember.Select
can be bound to a property on another object:
App.ApplicationController = Ember.ObjectController.extend({
  programmers: [
    {firstName: "Yehuda", id: 1},
    {firstName: "Tom",    id: 2}
  ],
  currentProgrammer: {
    id: 2
  }
});
{{view Ember.Select
       content=programmers
       optionValuePath="content.id"
       optionLabelPath="content.firstName"
       value=currentProgrammer.id}}
Would result in the following HTML with a selected option:
<select class="ember-select">
  <option value="1">Yehuda</option>
  <option value="2" selected="selected">Tom</option>
</select>
Interacting with the rendered element by selecting the first option
('Yehuda') will update the id of currentProgrammer
to match the value property of the newly selected <option>.
Alternatively, you can control selection through the underlying objects
used to render each object by binding the selection option. When the selected
<option> is changed, the property path provided to selection
will be updated to match the content object of the rendered <option>
element:
var yehuda = {firstName: "Yehuda", id: 1, bff4eva: 'tom'}
var tom = {firstName: "Tom", id: 2, bff4eva: 'yehuda'};
App.ApplicationController = Ember.ObjectController.extend({
  selectedPerson: tom,
  programmers: [
    yehuda,
    tom
  ]
});
{{view Ember.Select
       content=programmers
       optionValuePath="content.id"
       optionLabelPath="content.firstName"
       selection=selectedPerson}}
Would result in the following HTML with a selected option:
<select class="ember-select">
  <option value="1">Yehuda</option>
  <option value="2" selected="selected">Tom</option>
</select>
Interacting with the rendered element by selecting the first option
('Yehuda') will update the selectedPerson to match the object of
the newly selected <option>. In this case it is the first object
in the programmers
Supplying a Prompt
A null value for the Ember.Select's value or selection property
results in there being no <option> with a selected attribute:
App.ApplicationController = Ember.ObjectController.extend({
  selectedProgrammer: null,
  programmers: [
    "Yehuda",
    "Tom"
  ]
});
{{view Ember.Select
       content=programmers
       value=selectedProgrammer
}}
Would result in the following HTML:
<select class="ember-select">
  <option value="Yehuda">Yehuda</option>
  <option value="Tom">Tom</option>
</select>
Although selectedProgrammer is null and no <option>
has a selected attribute the rendered HTML will display the
first item as though it were selected. You can supply a string
value for the Ember.Select to display when there is no selection
with the prompt option:
App.ApplicationController = Ember.ObjectController.extend({
  selectedProgrammer: null,
  programmers: [
    "Yehuda",
    "Tom"
  ]
});
{{view Ember.Select
       content=programmers
       value=selectedProgrammer
       prompt="Please select a name"
}}
Would result in the following HTML:
<select class="ember-select">
  <option>Please select a name</option>
  <option value="Yehuda">Yehuda</option>
  <option value="Tom">Tom</option>
</select>
Item Index
Methods
- $
 - _applyAttributeBindings
 - _applyClassNameBindings
 - _classStringForProperty
 - _contextDidChange
 - _elementDidChange
 - _insertElementLater
 - _isVisibleDidChange
 - _notifyWillDestroyElement
 - _parentViewDidChange
 - _scheduledDestroy
 - addObserver
 - append
 - appendTo
 - beginPropertyChanges
 - cacheFor
 - createChildView
 - createElement
 - decrementProperty
 - destroy
 - destroyElement
 - eachComputedProperty
 - endPropertyChanges
 - findElementInParentElement
 - get
 - getProperties
 - getWithDefault
 - handleEvent
 - has
 - hasObserverFor
 - incrementProperty
 - init
 - invokeRecursively
 - metaForProperty
 - nearestChildOf
 - nearestInstanceOf deprecated
 - nearestOfType
 - nearestWithProperty
 - notifyPropertyChange
 - off
 - on
 - one
 - propertyDidChange
 - propertyWillChange
 - remove
 - removeAllChildren
 - removeChild
 - removeFromParent
 - removeObserver
 - render
 - renderToBuffer
 - reopen
 - reopenClass
 - replaceIn
 - rerender
 - send
 - set
 - setProperties
 - setUnknownProperty
 - toggleProperty
 - toString
 - trigger
 - willDestroy
 - willMergeMixin
 
Properties
- _context
 - actions
 - ariaRole
 - attributeBindings
 - childViews
 - classNameBindings
 - classNames
 - concatenatedProperties
 - content
 - context
 - controller
 - disabled
 - element
 - groupView
 - instrumentDisplay
 - isDestroyed
 - isDestroying
 - isVisible
 - layout
 - layoutName
 - multiple
 - optionGroupPath
 - optionLabelPath
 - optionValuePath
 - optionView
 - parentView
 - prompt
 - required
 - selection
 - tagName
 - template
 - templateName
 - value
 
Methods
$
        - 
                        
[selector] 
view.$('li') will return a jQuery object containing
all of the li elements inside the DOM element of this view.
    Parameters:
- 
                        
[selector]String optionala jQuery-compatible selector string 
Returns:
_applyAttributeBindings
        - 
                        
buffer 
Parameters:
- 
                        
bufferEmber.RenderBuffer 
_applyClassNameBindings
        ()
        private
    
    classNameBindings array, inserts the value
of the specified property into the classNames array, then creates an
observer to update the view's element if the bound property ever changes
in the future.
    _classStringForProperty
        - 
                        
property 
isUrgent that evaluates to true,
passing isUrgent to this method will return "is-urgent".
    Parameters:
- 
                        
propertyObject 
_contextDidChange
        ()
        private
    
    _elementDidChange
        ()
        private
    
    _insertElementLater
        - 
                        
fn 
willInsertElement event. After your function is invoked, this view
and all of its child views will receive the didInsertElement event.
`javascript
view._insertElementLater(function() {
  this.createElement();
  this.$().appendTo('body');
});
`
    Parameters:
- 
                        
fnFunctionthe function that inserts the element into the DOM 
_isVisibleDidChange
        ()
        private
    
    isVisible property changes, toggle the visibility
element of the actual DOM element.
    _notifyWillDestroyElement
        ()
        private
    
    willDestroyElement event (which invokes the
willDestroyElement() method if it exists) on this view and all child
views.
Before triggering willDestroyElement, it first triggers the
willClearRender event recursively.
    _parentViewDidChange
        ()
        private
    
    controller
    _scheduledDestroy
        ()
        private
    
    destroy method.
    addObserver
        - 
                        
key - 
                        
target - 
                        
method 
context parameter:
`javascript
fooDidChange: function(sender, key, value, rev) { };
`
The sender is the object that changed. The key is the property that
changes. The value property is currently reserved and unused. The rev
is the last property revision of the object when it changed, which you can
use to detect if the key value has really changed or not.
If you pass a context parameter, the context will be passed before the
revision like so:
`javascript
fooDidChange: function(sender, key, value, context, rev) { };
`
Usually you will not need the value, context or revision parameters at
the end. In this case, it is common to write observer methods that take
only a sender and key value as parameters or, if you aren't interested in
any of these values, to write an observer that has no parameters at all.
    append
        ()
        
            Ember.View
        
    
    createElement() will be called
automatically.
If your application uses the rootElement property, you must append
the view within that element. Rendering views outside of the rootElement
is not supported.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the document body until all bindings have
finished synchronizing.
    Returns:
appendTo
        - 
                        
A 
createElement()
will be called automatically.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the given element until all bindings have
finished synchronizing.
This is not typically a function that you will need to call directly when
building your application. You might consider using Ember.ContainerView
instead. If you do need to use appendTo, be sure that the target element
you are providing is associated with an Ember.Application and does not
have an ancestor element that is associated with an Ember view.
    Parameters:
- 
                        
AString | DOMElement | JQueryselector, element, HTML string, or jQuery object 
Returns:
beginPropertyChanges
        ()
        
            Ember.Observable
        
    
    endPropertyChanges() to deliver the deferred change notifications and end
deferring.
    Returns:
cacheFor
        - 
                        
keyName 
Parameters:
- 
                        
keyNameString 
Returns:
createChildView
        - 
                        
viewClass - 
                        
[attrs] 
createChildViews(). Note that this method will
automatically configure the correct settings on the new view instance to
act as a child of the parent.
    Parameters:
- 
                        
viewClassClass | String - 
                        
[attrs]Hash optionalAttributes to add 
Returns:
createElement
        ()
        
            Ember.View
        
    
    render() method.
After the element has been created, didInsertElement will
be called on this view and all of its child views.
    Returns:
decrementProperty
        - 
                        
keyName - 
                        
decrement 
`javascript
player.decrementProperty('lives');
orc.decrementProperty('health', 5);
`
    Parameters:
- 
                        
keyNameStringThe name of the property to decrement - 
                        
decrementNumberThe amount to decrement by. Defaults to 1 
Returns:
destroy
        ()
    
    destroy on a view to destroy the view (and all of its
child views). This will remove the view from any parent node, then make
sure that the DOM element managed by the view can be released by the
memory manager.
    destroyElement
        ()
        
            Ember.View
        
    
    willDestroyElement() on your view, then this method will
be invoked on your view before your element is destroyed to give you a
chance to clean up any event handlers, etc.
If you write a willDestroyElement() handler, you can assume that your
didInsertElement() handler was called earlier for the same element.
You should not call or override this method yourself, but you may
want to implement the above callbacks.
    Returns:
eachComputedProperty
        - 
                        
callback - 
                        
binding 
metaForProperty) to the callback.
    Parameters:
- 
                        
callbackFunction - 
                        
bindingObject 
endPropertyChanges
        ()
        
            Ember.Observable
        
    
    beginPropertyChanges() at the beginning of the changes to defer change
notifications. When you are done making changes, call this method to
deliver the deferred change notifications and end deferring.
    Returns:
findElementInParentElement
        - 
                        
parentElement 
elementId (or the
view's guid if elementId is null). You can override this method to
provide your own form of lookup. For example, if you want to discover your
element using a CSS class name instead of an ID.
    Parameters:
- 
                        
parentElementDOMElementThe parent's DOM element 
Returns:
get
        - 
                        
keyName 
object[keyName] or object.keyName,
however it supports both computed properties and the unknownProperty
handler.
Because get unifies the syntax for accessing all these kinds
of properties, it can make many refactorings easier, such as replacing a
simple property with a computed property, or vice versa.
### Computed Properties
Computed properties are methods defined with the property modifier
declared at the end, such as:
`javascript
fullName: function() {
  return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
`
When you call get on a computed property, the function will be
called and the return value will be returned instead of the function
itself.
### Unknown Properties
Likewise, if you try to call get on a property whose value is
undefined, the unknownProperty() method will be called on the object.
If this method returns any value other than undefined, it will be returned
instead. This allows you to implement "virtual" properties that are
not defined upfront.
    Parameters:
- 
                        
keyNameStringThe property to retrieve 
Returns:
getProperties
        - 
                        
list 
getProperties
with a list of strings or an array:
`javascript
record.getProperties('firstName', 'lastName', 'zipCode');  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
`
is equivalent to:
`javascript
record.getProperties(['firstName', 'lastName', 'zipCode']);  // { firstName: 'John', lastName: 'Doe', zipCode: '10011' }
`
    Parameters:
- 
                        
listString... | Arrayof keys to get 
Returns:
getWithDefault
        - 
                        
keyName - 
                        
defaultValue 
undefined.
`javascript
person.getWithDefault('lastName', 'Doe');
`
    Parameters:
- 
                        
keyNameStringThe name of the property to retrieve - 
                        
defaultValueObjectThe value to return if the property value is undefined 
Returns:
handleEvent
        - 
                        
eventName - 
                        
evt 
Ember.EventDispatcher
    Parameters:
- 
                        
eventNameString - 
                        
evtEvent 
has
        - 
                        
name 
Parameters:
- 
                        
nameStringThe name of the event 
Returns:
hasObserverFor
        - 
                        
key 
true if the object currently has observers registered for a
particular key. You can use this method to potentially defer performing
an expensive action until someone begins observing a particular property
on the object.
    Parameters:
- 
                        
keyStringKey to check 
Returns:
incrementProperty
        - 
                        
keyName - 
                        
increment 
`javascript
person.incrementProperty('age');
team.incrementProperty('score', 2);
`
    Parameters:
- 
                        
keyNameStringThe name of the property to increment - 
                        
incrementNumberThe amount to increment by. Defaults to 1 
Returns:
init
        ()
        private
    
    childViews
* register the view with the global views hash, which is used for event
  dispatch
    invokeRecursively
        - 
                        
fn - 
                        
includeSelf 
Parameters:
- 
                        
fnFunction - 
                        
includeSelfBooleanIncludes itself if true. 
metaForProperty
        - 
                        
key 
`javascript
person: function() {
  var personId = this.get('personId');
  return App.Person.create({ id: personId });
}.property().meta({ type: App.Person })
`
Once you've done this, you can retrieve the values saved to the computed
property from your class like this:
`javascript
MyClass.metaForProperty('person');
`
This will return the original hash that was passed to meta().
    Parameters:
- 
                        
keyStringproperty name 
nearestChildOf
        - 
                        
klass 
klass.
    Parameters:
- 
                        
klassClassSubclass of Ember.View (or Ember.View itself) 
Returns:
nearestInstanceOf
        - 
                        
klass 
Parameters:
- 
                        
klassClassSubclass of Ember.View (or Ember.View itself) 
Returns:
nearestOfType
        - 
                        
klass 
Parameters:
- 
                        
klassClass,MixinSubclass of Ember.View (or Ember.View itself), or an instance of Ember.Mixin. 
Returns:
nearestWithProperty
        - 
                        
property 
Parameters:
- 
                        
propertyStringA property name 
Returns:
notifyPropertyChange
        - 
                        
keyName 
propertyWillChange and propertyDidChange in
succession.
    Parameters:
- 
                        
keyNameStringThe property key to be notified about. 
Returns:
off
        - 
                        
name - 
                        
target - 
                        
method 
Parameters:
Returns:
on
        - 
                        
name - 
                        
[target] - 
                        
method 
`javascript
person.on('didLoad', function() {
  // fired once the person has loaded
});
`
An optional target can be passed in as the 2nd argument that will
be set as the "this" for the callback. This is a good way to give your
function access to the object triggering the event. When the target
parameter is used the callback becomes the third argument.
    Parameters:
Returns:
one
        - 
                        
name - 
                        
[target] - 
                        
method 
`one` when
you only care about the first time an event has taken place.
This function takes an optional 2nd argument that will become the "this"
value for the callback. If this argument is passed then the 3rd argument
becomes the function.
    Parameters:
Returns:
propertyDidChange
        - 
                        
keyName 
get() or set() on it. In this case, you can use this
method and propertyWillChange() instead. Calling these two methods
together will notify all observers that the property has potentially
changed value.
Note that you must always call propertyWillChange and propertyDidChange
as a pair. If you do not, it may get the property change groups out of
order and cause notifications to be delivered more often than you would
like.
    Parameters:
- 
                        
keyNameStringThe property key that has just changed. 
Returns:
propertyWillChange
        - 
                        
keyName 
get() or set() on it. In this case, you can use this
method and propertyDidChange() instead. Calling these two methods
together will notify all observers that the property has potentially
changed value.
Note that you must always call propertyWillChange and propertyDidChange
as a pair. If you do not, it may get the property change groups out of
order and cause notifications to be delivered more often than you would
like.
    Parameters:
- 
                        
keyNameStringThe property key that is about to change. 
Returns:
remove
        ()
        
            Ember.View
        
    
    Returns:
removeAllChildren
        ()
        
            Ember.View
        
    
    parentView.
    Returns:
removeChild
        - 
                        
view 
Parameters:
- 
                        
viewEmber.View 
Returns:
removeFromParent
        ()
        
            Ember.View
        
    
    parentView, if one is found. Otherwise
does nothing.
    Returns:
removeObserver
        - 
                        
key - 
                        
target - 
                        
method 
addObserver() and your
target will no longer receive notifications.
    render
        - 
                        
buffer 
Ember.RenderBuffer. Most users will want to override the template
or templateName properties instead of this method.
By default, Ember.View will look for a function in the template
property and invoke it with the value of context. The value of
context will be the view's controller unless you override it.
    Parameters:
- 
                        
bufferEmber.RenderBufferThe render buffer 
renderToBuffer
        - 
                        
buffer 
render() method is invoked, which is responsible for
doing the bulk of the rendering.
You should not need to override this method; instead, implement the
template property, or if you need more control, override the render
method.
    Parameters:
- 
                        
bufferEmber.RenderBufferthe render buffer. If no buffer is passed, a default buffer, using the current view'stagName, will be used. 
reopen
        ()
    
    `javascript
MyObject = Ember.Object.extend({
  name: 'an object'
});
o = MyObject.create();
o.get('name'); // 'an object'
MyObject.reopen({
  say: function(msg){
    console.log(msg);
  }
})
o2 = MyObject.create();
o2.say("hello"); // logs "hello"
o.say("goodbye"); // logs "goodbye"
`
To add functions and properties to the constructor itself,
see reopenClass
    reopenClass
        ()
    
    `javascript
MyObject = Ember.Object.extend({
  name: 'an object'
});
MyObject.reopenClass({
  canBuild: false
});
MyObject.canBuild; // false
o = MyObject.create();
`
In other words, this creates static properties and functions for the class. These are only available on the class
and not on any instance of that class.
`javascript
App.Person = Ember.Object.extend({
  name : "",
  sayHello : function(){
    alert("Hello. My name is " + this.get('name'));
  }
});
App.Person.reopenClass({
  species : "Homo sapiens",
  createPerson: function(newPersonsName){
    return App.Person.create({
      name:newPersonsName
    });
  }
});
var tom = App.Person.create({
  name : "Tom Dale"
});
var yehuda = App.Person.createPerson("Yehuda Katz");
tom.sayHello(); // "Hello. My name is Tom Dale"
yehuda.sayHello(); // "Hello. My name is Yehuda Katz"
alert(App.Person.species); // "Homo sapiens"
`
Note that species and createPerson are *not* valid on the tom and yehuda
variables. They are only valid on App.Person.
To add functions and properties to instances of
a constructor by extending the constructor's prototype
see reopen
    replaceIn
        - 
                        
target 
createElement() will be called automatically.
Note that this method just schedules the view to be appended; the DOM
element will not be appended to the given element until all bindings have
finished synchronizing
    Parameters:
- 
                        
targetString | DOMElement | JQueryA selector, element, HTML string, or jQuery object 
Returns:
rerender
        ()
    
    appendChild,
rerender will remove them, because they will be added again
if needed by the next render.
In general, if the display of your view changes, you should modify
the DOM element directly instead of manually calling rerender, which can
be slow.
    send
        - 
                        
actionName - 
                        
context 
ActionHandler. Any parameters
supplied after the actionName string will be passed as arguments
to the action target function.
If the ActionHandler has its target property set, actions may
bubble to the target. Bubbling happens when an actionName can
not be found in the ActionHandler's actions hash or if the
action target function returns true.
Example
`js
App.WelcomeRoute = Ember.Route.extend({
  actions: {
    playTheme: function() {
       this.send('playMusic', 'theme.mp3');
    },
    playMusic: function(track) {
      // ...
    }
  }
});
`
    Parameters:
- 
                        
actionNameStringThe action to trigger - 
                        
contexta context to send with the action 
set
        - 
                        
keyName - 
                        
value 
object[key] = value or
object.key = value, except that it provides support for computed
properties, the setUnknownProperty() method and property observers.
### Computed Properties
If you try to set a value on a key that has a computed property handler
defined (see the get() method for an example), then set() will call
that method, passing both the value and key instead of simply changing
the value itself. This is useful for those times when you need to
implement a property that is composed of one or more member
properties.
### Unknown Properties
If you try to set a value on a key that is undefined in the target
object, then the setUnknownProperty() handler will be called instead. This
gives you an opportunity to implement complex "virtual" properties that
are not predefined on the object. If setUnknownProperty() returns
undefined, then set() will simply set the value on the object.
### Property Observers
In addition to changing the property, set() will also register a property
change with the object. Unless you have placed this call inside of a
beginPropertyChanges() and endPropertyChanges(), any "local" observers
(i.e. observer methods declared on the same object), will be called
immediately. Any "remote" observers (i.e. observer methods declared on
another object) will be placed in a queue and called at a later time in a
coalesced manner.
### Chaining
In addition to property changes, set() returns the value of the object
itself so you can do chaining like this:
`javascript
record.set('firstName', 'Charles').set('lastName', 'Jolley');
`
    Parameters:
- 
                        
keyNameStringThe property to set - 
                        
valueObjectThe value to set ornull. 
Returns:
setProperties
        - 
                        
hash 
beginPropertyChanges and endPropertyChanges batch, so
observers will be buffered.
`javascript
record.setProperties({ firstName: 'Charles', lastName: 'Jolley' });
`
    Parameters:
- 
                        
hashHashthe hash of keys and values to set 
Returns:
setUnknownProperty
        - 
                        
key - 
                        
value 
Parameters:
- 
                        
keyObject - 
                        
valueObject 
toggleProperty
        - 
                        
keyName 
`javascript
starship.toggleProperty('warpDriveEngaged');
`
    Parameters:
- 
                        
keyNameStringThe name of the property to toggle 
Returns:
toString
        ()
        
            String
        
    
    toString typically does, in a generic way for all Ember
objects.
`javascript
App.Person = Em.Object.extend()
person = App.Person.create()
person.toString() //=> "`
If the object's class is not defined on an Ember namespace, it will
indicate it is a subclass of the registered superclass:
   `javascript
Student = App.Person.extend()
student = Student.create()
student.toString() //=> "<(subclass of App.Person):ember1025>"
`
If the method toStringExtension is defined, its return value will be
included in the output.
`javascript
App.Teacher = App.Person.extend({
  toStringExtension: function() {
    return this.get('fullName');
  }
});
teacher = App.Teacher.create()
teacher.toString(); //=> "`
    Returns:
trigger
        - 
                        
name 
Ember.Evented to
also call methods with the given name.
    Parameters:
- 
                        
nameString 
willDestroy
        ()
    
    willMergeMixin
        ()
        private
    
    actions to _actions at extend time. Note that this currently
modifies the mixin themselves, which is technically dubious but
is practically of little consequence. This may change in the future.
    Properties
_context
    Unknown
        private
    
    parentView's context (for a child of a ContainerView)
The code in Handlebars that overrides the _context property first
checks to see whether the view has a specified controller. This is
something of a hack and should be revisited.
    actions
    Hash
    
    ActionHandler as action targets.
These functions will be invoked when a matching {{action}} is triggered
from within a template and the application's current route is this route.
Actions can also be invoked from other parts of your application
via ActionHandler#send.
The actions hash will inherit action handlers from
the actions hash defined on extended parent classes
or mixins rather than just replace the entire hash, e.g.:
`js
App.CanDisplayBanner = Ember.Mixin.create({
  actions: {
    displayBanner: function(msg) {
      // ...
    }
  }
});
App.WelcomeRoute = Ember.Route.extend(App.CanDisplayBanner, {
  actions: {
    playMusic: function() {
      // ...
    }
  }
});
// WelcomeRoute, when active, will be able to respond
// to both actions, since the actions hash is merged rather
// then replaced when extending mixins / parent classes.
this.send('displayBanner');
this.send('playMusic');
`
Within a Controller, Route, View or Component's action handler,
the value of the this context is the Controller, Route, View or
Component object:
`js
App.SongRoute = Ember.Route.extend({
  actions: {
    myAction: function() {
      this.controllerFor("song");
      this.transitionTo("other.route");
      ...
    }
  }
});
`
It is also possible to call this._super() from within an
action handler if it overrides a handler defined on a parent
class or mixin:
Take for example the following routes:
`js
App.DebugRoute = Ember.Mixin.create({
  actions: {
    debugRouteInformation: function() {
      console.debug("trololo");
    }
  }
});
App.AnnoyingDebugRoute = Ember.Route.extend(App.DebugRoute, {
  actions: {
    debugRouteInformation: function() {
      // also call the debugRouteInformation of mixed in App.DebugRoute
      this._super();
      // show additional annoyance
      window.alert(...);
    }
  }
});
`
## Bubbling
By default, an action will stop bubbling once a handler defined
on the actions hash handles it. To continue bubbling the action,
you must return true from the handler:
`js
App.Router.map(function() {
  this.resource("album", function() {
    this.route("song");
  });
});
App.AlbumRoute = Ember.Route.extend({
  actions: {
    startPlaying: function() {
    }
  }
});
App.AlbumSongRoute = Ember.Route.extend({
  actions: {
    startPlaying: function() {
      // ...
      if (actionShouldAlsoBeTriggeredOnParentRoute) {
        return true;
      }
    }
  }
});
`
    Default: null
ariaRole
    String
    
    Default: null
attributeBindings
    Unknown
    
    `javascript
// Applies the type attribute to the element
// with the value "button", like `
If the value of the property is a Boolean, the name of that property is
added as an attribute.
`javascript
// Renders something like `
    childViews
    Array
        private
    
    appendChild and removeFromParent.
    Default: []
classNameBindings
    Array
    
    `javascript
// Applies the 'high' class to the view element
Ember.View.extend({
  classNameBindings: ['priority']
  priority: 'high'
});
`
If the value of the property is a Boolean, the name of that property is
added as a dasherized class name.
`javascript
// Applies the 'is-urgent' class to the view element
Ember.View.extend({
  classNameBindings: ['isUrgent']
  isUrgent: true
});
`
If you would prefer to use a custom value instead of the dasherized
property name, you can pass a binding like this:
`javascript
// Applies the 'urgent' class to the view element
Ember.View.extend({
  classNameBindings: ['isUrgent:urgent']
  isUrgent: true
});
`
This list of properties is inherited from the view's superclasses as well.
    Default: []
classNames
    Array
    
    Default: ['ember-view']
concatenatedProperties
    Array
    
    classNames property of Ember.View.
Here is some sample code showing the difference between a concatenated
property and a normal one:
`javascript
App.BarView = Ember.View.extend({
  someNonConcatenatedProperty: ['bar'],
  classNames: ['bar']
});
App.FooBarView = App.BarView.extend({
  someNonConcatenatedProperty: ['foo'],
  classNames: ['foo'],
});
var fooBarView = App.FooBarView.create();
fooBarView.get('someNonConcatenatedProperty'); // ['foo']
fooBarView.get('classNames'); // ['ember-view', 'bar', 'foo']
`
This behavior extends to object creation as well. Continuing the
above example:
`javascript
var view = App.FooBarView.create({
  someNonConcatenatedProperty: ['baz'],
  classNames: ['baz']
})
view.get('someNonConcatenatedProperty'); // ['baz']
view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
`
Adding a single property that is not an array will just add it in the array:
`javascript
var view = App.FooBarView.create({
  classNames: 'baz'
})
view.get('classNames'); // ['ember-view', 'bar', 'foo', 'baz']
`
Using the concatenatedProperties property, we can tell to Ember that mix
the content of the properties.
In Ember.View the classNameBindings and attributeBindings properties
are also concatenated, in addition to classNames.
This feature is available for you to use throughout the Ember object model,
although typical app developers are likely to use it infrequently. Since
it changes expectations about behavior of properties, you should properly
document its usage in each individual concatenated property (to not
mislead your users to think they can override the property in a subclass).
    Default: null
content
    Array
    
    The list of options.
If optionLabelPath and optionValuePath are not overridden, this should
be a list of strings, which will serve simultaneously as labels and values.
Otherwise, this should be a list of objects. For instance:
Ember.Select.create({
  content: A([
      { id: 1, firstName: 'Yehuda' },
      { id: 2, firstName: 'Tom' }
    ]),
  optionLabelPath: 'content.firstName',
  optionValuePath: 'content.id'
});
    Default: null
context
    Object
    
    controller
    Object
    
    disabled
    Boolean
    
    The disabled attribute of the select element. Indicates whether
the element is disabled from interactions.
Default: false
element
    DOMElement
    
    isDestroyed
    Unknown
    
    true the observers and bindings were already
removed by the effect of calling the destroy() method.
    Default: false
isDestroying
    Unknown
    
    destroy() method has been called.
The object stays intact until the end of the run loop at which point
the isDestroyed flag is set.
    Default: false
isVisible
    Boolean
    
    false, the view will appear hidden in DOM.
    Default: null
layout
    Function
    
    template property during rendering. It is the
responsibility of the layout template to retrieve the template
property from the view (or alternatively, call Handlebars.helpers.yield,
{{yield}}) to render it in the correct location.
This is useful for a view that has a shared wrapper, but which delegates
the rendering of the contents of the wrapper to the template property
on a subclass.
    layoutName
    String
    
    Ember.View will lookup a template with this name in
Ember.TEMPLATES (a shared global object).
    Default: null
multiple
    Boolean
    
    The multiple attribute of the select element. Indicates whether multiple
options can be selected.
Default: false
optionGroupPath
    String
    
    The path of the option group.
When this property is used, content should be sorted by optionGroupPath.
Default: null
parentView
    Ember.View
    
    Default: null
prompt
    String
    
    If given, a top-most dummy option will be rendered to serve as a user prompt.
Default: null
required
    Boolean
    
    The required attribute of the select element. Indicates whether
a selected option is required for form validation.
Default: false
selection
    Object or Array
    
    When multiple is false, the element of content that is currently
selected, if any.
When multiple is true, an array of such elements.
Default: null
tagName
    String
    
    tagName for an element, you
must destroy and recreate the view element.
By default, the render buffer will use a <div> tag for views.
    Default: null
template
    Function
    
    templateName property instead of setting
the template yourself.
    templateName
    String
    
    Ember.View will lookup a template with this name in
Ember.TEMPLATES (a shared global object).
    Default: null
value
    String
    
    In single selection mode (when multiple is false), value can be used to
get the current selection's value or set the selection by it's value.
It is not currently supported in multiple selection mode.
Default: null
