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

Extends M.View.
M.TextFieldView is the prototype of any text field input view. It can be rendered as both a single line text field and a multiple line text field. If it is styled as a multiple line text field, is has a built-in autogrow mechanism so the textfield is getting larger depending on the number of lines of text a user enters.
Defined in: text_field.js.

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

Field Summary
Field Attributes | Field Name and Description
--- | ---
| hasMultipleLines Defines whether the text field has multiple lines respectively is a text area.
| initialText The initial text shown inside the text field describing the input or making a suggestion for input e.g.
| isPassword Defines whether the text field is rendered as an password field or not.
| label The label proeprty defines a text that is shown above or next to the textfield as a 'title' for the textfield.
| name The name of the text field.
| 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
--- | ---
| disable() This method disables the text field by setting the disabled property of its html representation to true.
| enable() This method enables the text field by setting the disabled property of its html representation to false.
| gotFocus() This method is called whenever the view gets the focus.
| lostFocus() This method is called whenever the view lost the focus.
| setValue(value, delegateUpdate) This method sets the text field's value, initiates its re-rendering and call the delegateValueUpdate().
| setValueFromDOM(evt) This method sets its value to the value it has in its DOM representation and then delegates these changes to a controller property if the contentBindingReverse property is set.

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

Class Detail
M.TextFieldView()
Field Detail
{Boolean} hasMultipleLines
Defines whether the text field has multiple lines respectively is a text area.

{String} initialText
The initial text shown inside the text field describing the input or making a suggestion for input e.g. "Please enter your Name."

{Boolean} isPassword
Defines whether the text field is rendered as an password field or not.

{String} label
The label proeprty defines a text that is shown above or next to the textfield as a 'title' for the textfield. e.g. "Name:". If no label is specified, no label will be displayed.

{String} name
The name of the text field. During the rendering, this property gets assigned to the name property of the text field's html representation. This can be used to manually access the text field's DOM representation later on.

{String} type
The type of this object.
Method Detail
disable()
This method disables the text field by setting the disabled property of its html representation to true.

enable()
This method enables the text field by setting the disabled property of its html representation to false.

gotFocus()
This method is called whenever the view gets the focus. If there is a initial text specified and the value of this text field still equals this initial text, the value is emptied.

lostFocus()
This method is called whenever the view lost the focus. If there is a initial text specified and the value of this text field is empty, the value is set to the initial text.

setValue(value, delegateUpdate)
This method sets the text field's value, initiates its re-rendering and call the delegateValueUpdate().

Parameters:
{String} value
  The value to be applied to the text field view.
{Boolean} delegateUpdate
  Determines whether to delegate this value update to any observer or not.

setValueFromDOM(evt)
This method sets its value to the value it has in its DOM representation and then delegates these changes to a controller property if the contentBindingReverse property is set. Additionally call target / action if set.

Parameters:
{Object} evt
  The event triggered this method.

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