inputEx Documentation Back to homepage

inputEx Documentation > Overview 1.0.0

Overview

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)

Instantiating a Field / the "type" property :

There are 4 ways to instanciate a Field :

  • Calling the class constructor (classic) :

  • Using the inputEx.buildField function with the "type" construction:

  • Using the inputEx.buildField function with the "fieldClass" construction:

  • Through a meta-field (see below)

The default "type" associations :

booleaninputEx.CheckBox
colorinputEx.ColorField
dateinputEx.DateField
emailinputEx.EmailField
forminputEx.Form
groupinputEx.Group
hiddeninputEx.HiddenField
htmlinputEx.RTEField
inplaceeditinputEx.InPlaceEdit
IPv4inputEx.IPv4Field
listinputEx.ListField
pairinputEx.PairField
passwordinputEx.PasswordField
selectinputEx.SelectField
stringinputEx.StringField
textinputEx.Textarea
typeinputEx.TypeField
uneditableinputEx.UneditableField
urlinputEx.UrlField

To link a class with a "type", we use :

Meta-Fields :

Some special fields called meta-fields take one or multiple "type" construction objects as configuration.

  • Group: A group of fields. It is itself a Field so it can be combined with any other field.
  • Form: A group that provide ajax form capabilities.
  • List: list of any subfield.
  • InPlaceEdit: Make any subfield inplace-editable.
  • Typefield: A special field that returns a config object to create an instance through the inputEx.buildField function. We create a form for each Field class to define the parameters for the specified field.

Insert a Field into the DOM :

The "updated" event :

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)


Copyright (c) 2008 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 1.4.1 on Wed, 07 May 2008 10:26:30 GMT.