inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.StringField
Search:
 
Filters

Class inputEx.StringField - extends inputEx.Field

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

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 inherited from inputEx.Field:

Methods

disable

void disable ( )
Disable the field

enable

void enable ( )
Enable the field

focus

void focus ( )
Set the focus to this field

getStateString

void getStateString ( )
Add the minLength string message handling

getValue

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

initEvents

void initEvents ( )
Register the change, focus and blur events

isDisabled

void isDisabled ( )
Check if the field is disabled

onFocus

void onFocus ( )
Clear the typeInvite when the field gains focus

renderComponent

void renderComponent ( )
Render an 'INPUT' DOM node

setClassFromState

void setClassFromState ( )
Display the type invite after setting the class

setFieldName

void setFieldName ( )
Set the name of the field (or hidden field)

setOptions

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

setValue

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

validate

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

Events inherited from inputEx.Field:


Copyright © 2011 Eric Abouaf All rights reserved.