Class Index | File Index

Classes


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