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.ToggleView

Extends M.View.
M.ToggleView defines the prototype of any toggle view. A toggle view accepts exactly two child views and provides an easy mechanism to toggle between these two views. An easy example would be to define two different button views that can be toggled, a more complex scenario would be to define two content views (M.ScrollView) with own child views and toggle between them.
Defined in: toggle.js.

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
| isInFirstState States whether the toggle view currently displays its first child view or its second child view.
| toggleOnClick Determines whether to toggle the view on click.
| 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
--- | ---
| renderChildViews() This method renders one child view of the toggle view, based on the isInFirstState property: YES = first child view, NO = second child view.
| renderUpdateChildViews() This method is called out of the toggleView method.
| toggleView() This method toggles the child views by first emptying the toggle view's content and then rendering the next child view by calling renderUpdateChildViews().

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.ToggleView()
Field Detail
{Boolean} isInFirstState
States whether the toggle view currently displays its first child view or its second child view.

{Boolean} toggleOnClick
Determines whether to toggle the view on click. This might be useful if the child views are e.g. buttons.

{String} type
The type of this object.
Method Detail
renderChildViews()
This method renders one child view of the toggle view, based on the isInFirstState property: YES = first child view, NO = second child view.

renderUpdateChildViews()
This method is called out of the toggleView method. It basically empties the html representation of the toggle view and then renders the proper child view based on the isInFirstState property: YES = first child view, NO = second child view.

toggleView()
This method toggles the child views by first emptying the toggle view's content and then rendering the next child view by calling renderUpdateChildViews().

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