Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2009-11-25 04:39:56
Size: 623
Editor: BenGolding
Comment:
Revision 6 as of 2011-02-15 06:05:18
Size: 1310
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
 - Field  * Field
Line 7: Line 7:
   A data input field. It can format its output and validate its input. It contains a copy of the value that it holds so that the user can edit it without needing to maintain a separate copy in the application.    A data input field. It can format its output and validate its input. It contains a copy of the value so that the user can edit it without needing to maintain a separate copy in the application.
Line 9: Line 9:
 - Fieldset  * Fieldset
Line 11: Line 11:
   Groups together a list of Fields and renders them in a table.    Groups together a list of Fields and renders them in a table.  It is conceptually related the HTML {{{fieldset}}} tag which groups related input fields together.
Line 13: Line 13:
 - Form    Fieldsets are intended to only hold data fields. If you try to insert a Button into a Fieldset it's not likely to work, in part because Fieldset expects that each Field member will respond to certain methods, and in part because notionally is that buttons apply actions to all the fields in the fieldset.
Line 15: Line 15:
   Manages the all of the fields in the form.  * Form

   Manages the all of the fields in the form. Most interactions in the application are with Form instances: they coordinate loading values from model objects (typically attributes of classes) into the Fields, organise rendering and updating the values from the browser, validation, and storing the values back into the model objects.

Concepts

There are three main concepts that sit behind the Albatross forms implementation:

  • Field
    • A data input field. It can format its output and validate its input. It contains a copy of the value so that the user can edit it without needing to maintain a separate copy in the application.
  • Fieldset
    • Groups together a list of Fields and renders them in a table. It is conceptually related the HTML fieldset tag which groups related input fields together. Fieldsets are intended to only hold data fields. If you try to insert a Button into a Fieldset it's not likely to work, in part because Fieldset expects that each Field member will respond to certain methods, and in part because notionally is that buttons apply actions to all the fields in the fieldset.

  • Form
    • Manages the all of the fields in the form. Most interactions in the application are with Form instances: they coordinate loading values from model objects (typically attributes of classes) into the Fields, organise rendering and updating the values from the browser, validation, and storing the values back into the model objects.

Note that the Albatross form support doesn't emit an HTML form tag, the developer is still responsible for including that in the page template.

None: Concepts (last edited 2011-02-15 06:05:18 by localhost)