inputEx Documentation Back to homepage

inputEx Documentation > inputEx.StringField 0.2.2

Static Class inputEx.StringField - extends inputEx.Field

Basic string field (equivalent to the input type "text")
Known Subclasses:
inputEx.AutoComplete inputEx.NumberField inputEx.FrenchPhone inputEx.PasswordField inputEx.IPv4Field inputEx.IntegerField inputEx.EmailField inputEx.UrlField inputEx.UpperCaseField inputEx.DateField

Constructor

inputEx.StringField ( options )
Parameters:
options <Object>  - Added options:
  • regexp: regular expression used to validate (otherwise it always validate)
  • size: size attribute of the input
  • maxLength: maximum size of the string field (no message display, uses the maxlength html attribute)
  • minLength: minimum size of the string field (will display an error message if shorter)
  • typeInvite: string displayed when the field is empty
  • readonly: set the field as readonly

Properties

static  groupOptions - Object

group Options for each field

options - Object

Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.

Methods

disable

disable()
Disable the field

enable

enable()
Enable the field

focus

focus()
Set the focus to this field

getStateString

getStateString(state)
Add the minLength string message handling
Parameters:
    state

getValue

getValue(The)
Return the string value
Parameters:
    The <String>  - string value

initEvents

initEvents()
Register the change, focus and blur events

onFocus

onFocus(e)
Clear the typeInvite when the field gains focus
Parameters:
    e

onKeyPress

onKeyPress(e)
Parameters:
    e

onKeyUp

onKeyUp(e)
Parameters:
    e

renderComponent

renderComponent()
Render an 'INPUT' DOM node

setClassFromState

setClassFromState()
Display the type invite after setting the class

setOptions

setOptions(options)
Set the default values of the options
Parameters:
    options <Object>  - Options object (inputEx inputParams) as passed to the constructor

setValue

setValue(value[,sendUpdatedEvt])
Function to set the value
Parameters:
    value <String>  - The new value
    sendUpdatedEvt <boolean> optional - (optional) Wether this setValue should fire the updatedEvt or not (default is true, pass false to NOT send the event)

updateTypeInvite

updateTypeInvite()

validate

validate()
Uses the optional regexp to validate the field value




Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:31 GMT using neyricjslibs-template.