cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steinar Jonsson <sjons...@online.no>
Subject Re: modifying form definition at runtime
Date Sun, 18 Mar 2007 20:49:38 GMT
On Sun, 2007-03-18 at 16:45 +0800, Rice Yeh wrote:
> Hi,
>   Is it possible to modify form definition at runtime? 

Yes, and as you see from other answers there are different ways it can
be done.

I did an application once where the form definition (and binding and
template) was generated at runtime. 

This was for a use case where forms had a certain structure, but what
fields they contained was not known until runtime. 

The controller (javaflow) would create a java object that contained
description of the form. Then, this object was fed into pipelines that
generated the form XMLs from jx templates. Those templates contained all
the static parts of the forms, with relatively simple jx directives to
insert the dynamic parts according to the description object data.

I remember struggling a lot to get all the pieces together, and suspect
it ended up being unnecessarily complex. It eventually worked, though.

Regards
Steinar Jonsson



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message