You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew Le Quesne <an...@nexusalpha.com> on 2006/02/10 13:29:28 UTC
CForms: creating dynamic widgets
Hi there,
I am trying to generate a dynamic form template so I can create a list of
questions that the user will answer from a set of questions stored in a
database table.
I am setting the definition file by using a pipeline -
cocoon:/forms/application/definition.jxt
To generate a JXT file.
This works as a basic form but I need to pass a Java Object to it so that I
can get a list of question objects from which to create the question set of
widgets. Can anyone give me any advice or are there any examples of
something similar anywhere.
I am using cocoon 2.1.8
Thanks,
Andrew
Re: CForms: creating dynamic widgets
Posted by Robin Wyles <ro...@robinwyles.com>.
Andrew,
From flow you can do...
cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/
Form.js");
...
var questions = someMethodToGetQuestions();
var model = loadDOM("forms/application/definition.jxt ",
{"questions": questions});
var form = new Form(model.getDocumentElement());
form.showForm("forms/application/template.jxt");
Hope this helps...
Robin
On 10 Feb 2006, at 13:29, Andrew Le Quesne wrote:
> Hi there,
>
> I am trying to generate a dynamic form template so I can create a
> list of questions that the user will answer from a set of questions
> stored in a database table.
>
> I am setting the definition file by using a pipeline - cocoon:/
> forms/application/definition.jxt
>
> To generate a JXT file.
>
> This works as a basic form but I need to pass a Java Object to it
> so that I can get a list of question objects from which to create
> the question set of widgets. Can anyone give me any advice or are
> there any examples of something similar anywhere.
>
> I am using cocoon 2.1.8
>
> Thanks,
>
> Andrew
>
Re: CForms: creating dynamic widgets
Posted by Adam Walsh <ad...@grummen.net>.
Hi Andrew,
This might be helpful to you -
http://issues.apache.org/jira/browse/COCOON-1418
Adam
Andrew Le Quesne wrote:
>
> Hi there,
>
> I am trying to generate a dynamic form template so I can create a list
> of questions that the user will answer from a set of questions stored
> in a database table.
>
> I am setting the definition file by using a pipeline -
> cocoon:/forms/application/definition.jxt
>
> To generate a JXT file.
>
> This works as a basic form but I need to pass a Java Object to it so
> that I can get a list of question objects from which to create the
> question set of widgets. Can anyone give me any advice or are there
> any examples of something similar anywhere.
>
> I am using cocoon 2.1.8
>
> Thanks,
>
> Andrew
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org