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

Extends M.View.
M.FormViews is the prototype of a form view, a container like view for grouping input views, e.g. M.TextFieldView. It covers a lot of the jobs concerning the validation of input views. There is no visible representation of an M.FormView, it is only used to ease the validation process and its accessing out of a controller.
Defined in: form.js.

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
| alertTitle The title of the alert view that comes up automatically if the validation fails, depending one the 'showAlertOnError' property.
| showAlertDialogOnError Determines whether to automatically show an alert dialog view out of the showError method if the validation failed or not.
| 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
--- | ---
| showErrors() This method adds a css class specified by the cssClassOnError property to any view that caused a validation error and has this property specified.
| validate() This method triggers the validate() on all child views, respectively on their validators.

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.FormView()
Field Detail
{String} alertTitle
The title of the alert view that comes up automatically if the validation fails, depending one the 'showAlertOnError' property.

{Boolean} showAlertDialogOnError
Determines whether to automatically show an alert dialog view out of the showError method if the validation failed or not. So if set to YES, all error messages are shown in an alert dialog view once the showError method is called.

{String} type
The type of this object.
Method Detail
showErrors()
This method adds a css class specified by the cssClassOnError property to any view that caused a validation error and has this property specified. If the showAlertDialogOnError property is set to YES, a alert dialog view is display additionally, presenting the error messages of all invalid views.

{Boolean} validate()
This method triggers the validate() on all child views, respectively on their validators.

Returns:
  {Boolean} The result of the validation process: valid or not.

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