cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject CForms update
Date Thu, 24 Feb 2005 17:06:41 GMT
Hi all,

I did some work towards stabilization of CForms. Here are the changes, 
which you can also find in status.xml:

- add Widget.getDefinition() to access the definition that was used to 
create the widget.
- make widget definitions immutable once setup. This is necessary with 
the previous change as a definition is shared by all of the widgets it 
creates and modifying it could lead to weird behaviors.
- new "output" widget state, where values are displayed but not read on 
the request. The difference with "disabled" is that "output" widgets are 
displayed as plain text and not as disabled inputs.
- add "on-create" event listeners that are called when a widget is created.
- deprecate "struct" in favor of "group" in definition, template and 
binding. More work is needed on the relation between ft:group and 
fi:group provided by forms-page-styling.xsl

- a field's selection list can be removed by setting it to null. This 
previously re-installed the widget definition's selection list.
- a field can have an optional initial value defined using 
<initial-value locale="...">...</initial-value>. The "locale" attribute 
is used to convert the value text into an object as defined by the 
datatype's convertor. This feature is also available on AggregateField 
and BooleanField (for which locale is useless).

Form.js :
- added "fun" and "ttl" parameters to Form.showForm(), which now has the 
exact same parameters as cocoon.sendPageAndWait().
- the argument of new Form(...) can now be either a String or a DOM 
Element. Accepting an Element allows the use of any kind of dynamic 
process to build the form definition.
- Form.showForm() now uses a single continuation, which saves memory and 
speeds up processing by shortening the continuation chain when the user 
has a long interaction with the form.
These changes where copied or inspired by the v2 and v3 Form.js and 
should allow them to be removed soon (other features have to be ported).

- the "action-command" attribute is deprecated and replaced by "command" 
which is now optional, except on repeater-action and row-action where it 
indicates what to do.
- new "insert-rows" repeater-action that insert new rows before the 
selected rows in a repeater.

Styling: styling "output" is deprecated and will be removed in 2.1.8. 
The "output" widget state should be used instead.

Need now to update the docs and write more samples...


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }

View raw message