Dear Wiki user, You have subscribed to a wiki page or wiki category on "Cocoon Wiki" for change notification.
The following page has been changed by JCKermagoret: http://wiki.apache.org/cocoon/DesignPattern/FormGeneration ------------------------------------------------------------------------------ * Form binding : describes the xml object you want to obtain. According the framework you use, you may convert it in Java object too, for example * Form template : describes how you want your fields to be displayed - * Filtering (see DesignPattern/Filtering) : filters and adapts files above thanks to additional tags (the filters) + * Filtering (see [:DesignPattern/Filtering]) : filters and adapts files above thanks to additional tags (the filters) = Advanced concepts = To avoid redundancy, increase maintenance and reduce complexity, it may be a good idea : * to implement class concept (at the field level), that will be aggregated and will define form repositories - * to define a metabind file for the binding and template file, associated with filter tags (see DesignPattern/Filtering) + * to define a metabind file for the binding and template file, associated with filter tags (see [:DesignPattern/Filtering]) * to define meta widgets in this metabind file, that will aggregate binding and templating tags in logical units you can reuse in different forms (like class for field and form definition) Just before starting, here is the directory structure : - {{{ + {{{|||| http://www.bluexml.org/static/images/class-form-generation-dp.gif ||http://www.bluexml.org/static/images/doctype-form-generation-dp.gif ||http://www.bluexml.org/static/images/metawidget-generation-dp.gif - }}} + ||||}}} == Class concept implementation == First, we have a form repository that lists the form classes we need. Form repositories are stored in cud/doctypes directory. Above, we create a calendar doctype, composed of a few classes : {{{ @@ -102, +102 @@ === Metawidgets === They are only a group of binding, template and filter tags. - For example, you maybe use often DateTime widgets, that displays date and time. To avoid redundancy, you can define the following metawidget : + For example, you maybe use often Date-Time widgets, that displays date and time. To avoid redundancy, you can define the following metawidget : {{{ <?xml version="1.0" encoding="ISO-8859-1"?> @@ -146, +146 @@ }}} === Metabind file === - In the example below, a calendar doctype is defined. Usual bindings for DateTime (among others) are reused through the DateTime metawidget. + In the example below, a calendar doctype is defined. Usual bindings for Date-Time (among others) are reused through the Date-Time metawidget. {{{ <fb:context
