inputEx Documentation Back to homepage
inputEx is built around the Field class. It is an abstract class (we never instantiate it).
All the other field classes inherits directly or indirectly from this base class. (see diagram below)
Warning: this diagram is not complete. See treeview for the full class diagram
There are 3 ways to instantiate a Field :
The default "type" associations : (Warning: this table is not complete, but each class follow the same naming conventions.)
type string | class | loader module |
---|---|---|
boolean | inputEx.CheckBox | inputex-checkbox |
color | inputEx.ColorField | inputex-colorfield |
date | inputEx.DateField | inputex-datefield |
inputEx.EmailField | inputex-emailfield | |
form | inputEx.Form | inputex-form |
group | inputEx.Group | inputex-group |
hidden | inputEx.HiddenField | inputex-hiddenfield |
html | inputEx.RTEField | inputex-rtefield |
inplaceedit | inputEx.InPlaceEdit | inputex-inplaceedit |
IPv4 | inputEx.IPv4Field | inputex-ipv4field |
list | inputEx.ListField | inputex-listfield |
password | inputEx.PasswordField | inputex-passwordfield |
select | inputEx.SelectField | inputex-selectfield |
string | inputEx.StringField | inputex-stringfield |
text | inputEx.Textarea | inputex-textarea |
type | inputEx.TypeField | inputex-typefield |
uneditable | inputEx.UneditableField | inputex-uneditablefield |
url | inputEx.UrlField | inputex-urlfield |
To link a class with a "type", we use :
Some special fields called meta-fields take one or multiple "type" construction objects as configuration.
All the fields fire the same event when they are "updated".
To subscribe this event for a field, use : (see YUI Custom Events for more informations)
This event is fired when you use a setValue on the field. If you want to disable this behaviour, pass "false" as second argument to the setValue and the event won't be fired.