You are not logged in Log in Join
You are here: Home » Members » pjentsch » FormulatorLayout » README » View Document

Log in
Name

Password

 

README

FormulatorLayout

FormulatorLayout is a utility package to assist in rendering Formulator forms in Zope (>=2.5.1).

FormulatorLayout provides a new object, Form Folder. Form Folders can contain Formulator Form objects and FormulatorLayout objects. Each FormulatorLayout object corresponds to one Formulator Form and renders all or some of the field defined in that form.

The object hierarchy within FormulatorLayout is slightly similar to that of GUI toolkits such a Swing or wxPython (well, very slightly :-). There are container objects (Page, Panel, FieldList) and component objects (Field, FieldRow, Error, Label, Button).

Containers and components are associated with two PageTemplates that know how to render a) forms, b) reports. To render a report, you'll have to provide an object and, optionally, a function to get attributes from that object (Zope careful_getattr) is used by default. The FormulatorLayout is then used to render a representation of the object using the field definitions provided in the formulator form. To edit an object, you may also pass an object to FormulatorLayout when rendering a form. The fields will be filled with the corresponding values of the object you passed in.

To use a FormulatorLayout in your application, you'll have to call the render or renderReport method on the FormulatorLayout object.

------------------------------------------------------------

example:

 <html metal:use-macro="here/master_template/macros/page">
 <...>
 <div tal:replace="structure
 here/forms/frmAccountLayout/render">account information   form</div>
 <...>
 </html>

-----------------------------------------------------------

This program requires the open-source application server ZOPE (Z Object Publishing Environment).

(c) 2002 P. Jentsch

This program is free software. See LICENSE for details.