cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <>
Subject Re: Woody + FlowScript : documentation on model
Date Tue, 27 Apr 2004 15:53:54 GMT
On Tue, 2004-04-27 at 16:48, wrote:
> Dear All,
> I'm looking for some documentation on the object "model" returned in
> the flowscript when doing...
> form.showForm("new-display-pipeline/login");
> var model = form.getModel();

I would advice you not to use that particular model, which is a
javascript-oriented model to the form. This has been superceded by new
work (see the "v2" sample). Work is still needed on integrating all that
together in a new, stable flowscript API.

if you do form.getWidget(), you will get the java Form object.

API docs for cocoon can be found here:

are important ones

> We can of course retrieve the widget, but can we change the label of
> the widget, the key of the i18n of the label, can we change the
> style,... ?

no, no and no, respectively

But don't let these answers scare you away.

The idea is as follows:

* you define your form model in a definition file
* the form definition file is parsed into a form definition object model
(which is actually a tree of widget definition objects)
* you create a form instance based on the form model. The form instance
is a tree of widget instance objects.
* the form/widget instances are lightweight objects and reference their
definition counterpart for most needs. The widget instances mostly store
the user-entered data.
* on the widget-instance level you can however change some other things
as well, like change the selection list, add event listeners and

However, things like labels are not changeable on the widget instance
level. You're the first one to ask for it. Do you need it? What's your
use case?

Styling info does not exist at all in the form model, only in the

Bruno Dumon                   
Outerthought - Open Source, Java & XML Competence Support Center                

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message