On 3/19/07, Steinar Jonsson <[EMAIL PROTECTED]> wrote:

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.


With this way, the whole page will be rendered again. I want to use cocoon's
ajax (browser update stuff) to update just the changed widgets through the
fd:action's on-action event.


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to