Rice Yeh wrote:
On 3/18/07, *Tobia* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:Rice Yeh wrote: > Is it possible to modify form definition at runtime? Can't you put <fd:repeater>, <fd:group>, and other containers in your form where appropriate, and then add, remove, or change the child widgets at runtime, through addChild() and similar methods?Yes. I am considering the way you suggest. My first problem I am meeting is how I construct a widget from definition without a form. I am studying cocooon-forms' source code to find a way. I like to see here whether there is anyone who has done the similar thing before.
I think what Tobia was suggesting was to use the dynamic widget types (repeater, union, class/new etc.) to pre-build certain groupings of widgets which can be assembled at runtime. This doesn't require programatically constructing new widget definitions, just manipulation of the repeaters/unions that already exist in the form.
See the "Form Model GUI" sample for a good example of this sort of dynamic structure: http://cocoon.zones.apache.org/demos/21branch/samples/blocks/forms/form_model_gui.flow
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
