Class Index | File Index

## Classes

- _global_
- M
- M.ActionSheetDialogView
- M.AlertDialogView
- M.Application
- M.Base64
- M.ButtonGroupView
- M.ButtonView
- M.ConfirmDialogView
- M.ContainerView
- M.Controller
- M.Cypher
- M.DataProvider
- M.Date
- M.DateValidator
- M.EmailValidator
- M.Environment
- M.EventDispatcher
- M.FormView
- M.GridView
- M.I18N
- M.ImageView
- M.LabelView
- M.ListItemView
- M.ListView
- M.LoaderView
- M.LocalStorageProvider
- M.Logger
- M.Math
- M.Model
- M.ModelAttribute
- M.ModelRegistry
- M.NotMinusValidator
- M.NumberValidator
- M.Object
- M.Observable
- M.PageView
- M.PhoneValidator
- M.PresenceValidator
- M.RecordManager
- M.RemoteStorageProvider
- M.Request
- M.ScrollView
- M.SearchBarView
- M.SelectionListItemView
- M.SelectionListView
- M.SHA256
- M.TabBarItemView
- M.TabBarView
- M.TextFieldView
- M.ToggleView
- M.ToolbarView
- M.UrlValidator
- M.Validator
- M.View
- M.ViewManager
- M.WebSqlProvider

# Class M.SelectionListView

Extends M.View.
This defines the prototype of any selection list view. A selection list view displays a list with several items of which either only one single item (M.SINGLE_SELECTION) or many items (M.MULTIPLE_SELECTION) can be selected.
Defined in: selection_list.js.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| M.SelectionListView()

Field Summary
Field Attributes | Field Name and Description
--- | ---
| onSelect This property is used to define a method that is executed onSelect of an item of this selection list.
| removeItemsOnUpdate Determines whether to remove all item if the list is updated or not.
| selection The selected item(s) of this list.
| selectionMode The selection mode for this selection list.
| type The type of this object.

Fields borrowed from class M.View:
  childViews, contentBinding, cssClass, cssClassOnError, cssClassOnInit, cssStyle, hasFocus, html, id, isInline, isView, modelId, parentView, triggerActionOnChange, triggerActionOnEnter, triggerActionOnKeyUp, value

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addItem(item) This method adds a new selection list item to the selection list view by simply appending its html representation to the selection list view inside the DOM.
| getSelection() This method returns the selected item's value(s) either as a String (M.SINGLE_SELECTION) or as an Array (M.MULTIPLE_SELECTION).
| itemSelected(id) This method is called everytime a item is selected / clicked.
| removeAllItems() This method removes all of the selection list view's items by removing all of its content in the DOM.
| removeSelection() This method de-selects all of the selection list's items.
| setSelection(selection) This method can be used to select items programmatically.

Methods borrowed from class M.View:
  addCssClass, attachToObservable, clearHtml, computeValue, contentDidChange, delegateValueUpdate, design, gotFocus, lostFocus, nl2br, removeCssClass, removeCssProperty, renderUpdate, secure, setCssProperty, setValueFromDOM, style, theme, themeChildViews
Methods borrowed from class M.Object:
  bindToCaller, create, destroy, extend, get, include, set

Class Detail
M.SelectionListView()
Field Detail
{Object} onSelect
This property is used to define a method that is executed onSelect of an item of this selection list.

{Boolean} removeItemsOnUpdate
Determines whether to remove all item if the list is updated or not.

{String, Array} selection
The selected item(s) of this list.

{String} selectionMode
The selection mode for this selection list. This can either be single or multiple selection. To set this value use one of the two constants: - M.SINGLE_SELECTION - M.MULTIPLE_SELECTION

{String} type
The type of this object.
Method Detail
addItem(item)
This method adds a new selection list item to the selection list view by simply appending its html representation to the selection list view inside the DOM. This method is based on jQuery's append().

Parameters:
{String} item
  The html representation of a selection list item to be added.

{String|Array} getSelection()
This method returns the selected item's value(s) either as a String (M.SINGLE_SELECTION) or as an Array (M.MULTIPLE_SELECTION).

Returns:
  {String|Array} The selected item's value(s).

itemSelected(id)
This method is called everytime a item is selected / clicked. If the selected item changed, the defined onSelect action is triggered.

Parameters:
{String} id
  The id of the selected item.

removeAllItems()
This method removes all of the selection list view's items by removing all of its content in the DOM. This method is based on jQuery's empty().

removeSelection()
This method de-selects all of the selection list's items.

setSelection(selection)
This method can be used to select items programmatically. The given parameter can either be a String (M.SINGLE_SELECTION) or an Array (M.MULTIPLE_SELECTION).

Parameters:
{String|Array} selection
  The selection that should be applied to the selection list.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Dec 08 2010 15:07:34 GMT+0100 (MEZ)