You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andre Juffer <an...@oulu.fi> on 2009/05/12 15:31:19 UTC
Form generation
Hi,
is the following allowed (in flow):
var data = ......;
var form = new Form("cocoon://make-form.jx", { "data" : data } );
The idea is to automatically generate a form definition from given data
with jx:forEach. The data object doesn't seem to be passed on.
The make-form.jx actually does exactly what it is supposed to do. I
tested this with
var data = .....;
cocoon.sendPage("make-form.jx", { "data" : data } );
and this gives me the right form definition.
If
new Form("cocoon://make-form.jx", { "data" : data } );
is not possible, what would be the alternative?
Thanks,
--
Andre H. Juffer | Phone: +358-8-553 1161
Biocenter Oulu and | Fax: +358-8-553-1141
Department of Biochemistry | Email: andre.juffer@oulu.fi
University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form generation
Posted by Andre Juffer <an...@oulu.fi>.
Derek Hohls wrote:
> Funny you should ask that; i had the same issue myself a while back:
> http://www.nabble.com/JX---Flowscipt-variable-not-accessible-in-generated-form--td21684221.html
> The answer there is the approach I adopted.
Yes, I see how this would work. I can adopt a similar approach.
Thanks, this is probably the solution I was looking for.
>
> Derek
>
> >>> On 2009/05/12 at 03:31, in message <4A...@oulu.fi>,
> Andre Juffer <an...@oulu.fi> wrote:
> Hi,
>
> is the following allowed (in flow):
>
> var data = ......;
> var form = new Form("cocoon://make-form.jx", { "data" : data } );
>
> The idea is to automatically generate a form definition from given data
> with jx:forEach. The data object doesn't seem to be passed on.
>
> The make-form.jx actually does exactly what it is supposed to do. I
> tested this with
>
> var data = .....;
> cocoon.sendPage("make-form.jx", { "data" : data } );
>
> and this gives me the right form definition.
>
> If
>
> new Form("cocoon://make-form.jx", { "data" : data } );
>
> is not possible, what would be the alternative?
>
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
>
> This message has been scanned for viruses and dangerous content by
> *MailScanner* <http://www.mailscanner.info/>,
> and is believed to be clean. MailScanner thanks Transtec Computers
> <http://www.transtec.co.uk/> for their support.
>
--
Andre H. Juffer | Phone: +358-8-553 1161
Biocenter Oulu and | Fax: +358-8-553-1141
Department of Biochemistry | Email: andre.juffer@oulu.fi
University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form generation
Posted by Derek Hohls <DH...@csir.co.za>.
Funny you should ask that; i had the same issue myself a while back:
http://www.nabble.com/JX---Flowscipt-variable-not-accessible-in-generated-form--td21684221.html
The answer there is the approach I adopted.
Derek
>>> On 2009/05/12 at 03:31, in message <4A...@oulu.fi>, Andre Juffer <an...@oulu.fi> wrote:
Hi,
is the following allowed (in flow):
var data = ......;
var form = new Form("cocoon://make-form.jx", { "data" : data } );
The idea is to automatically generate a form definition from given data
with jx:forEach. The data object doesn't seem to be passed on.
The make-form.jx actually does exactly what it is supposed to do. I
tested this with
var data = .....;
cocoon.sendPage("make-form.jx", { "data" : data } );
and this gives me the right form definition.
If
new Form("cocoon://make-form.jx", { "data" : data } );
is not possible, what would be the alternative?
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
Re: Form generation
Posted by Andre Juffer <an...@oulu.fi>.
DAVIGNON Andre - CETE NP/DIODé/PANDOC wrote:
> Hi,
>
> Yes, it works. You can define forms dynamically. And even pass
> "cocoon://make-form.jx" as a sitemap parameter.
OK. The point is however that in make-form.jx, the data object is
actually null. In other words, it doesn't seem to be passed on. I am
100% sure that it is -not- null in the flow scrip. I make a test in
make-form.jx to see if it is null.
>
> André
>
>
> Le 12/05/2009 15:31, > Andre Juffer (par Internet, dépôt
> users-return-97598-andre.davignon=developpement-durable.gouv.fr@cocoon.apache.org)
> a écrit :
>> Hi,
>>
>> is the following allowed (in flow):
>>
>> var data = ......;
>> var form = new Form("cocoon://make-form.jx", { "data" : data } );
>>
>> The idea is to automatically generate a form definition from given
>> data with jx:forEach. The data object doesn't seem to be passed on.
>>
>> The make-form.jx actually does exactly what it is supposed to do. I
>> tested this with
>>
>> var data = .....;
>> cocoon.sendPage("make-form.jx", { "data" : data } );
>>
>> and this gives me the right form definition.
>>
>> If
>>
>> new Form("cocoon://make-form.jx", { "data" : data } );
>>
>> is not possible, what would be the alternative?
>>
>> Thanks,
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Andre H. Juffer | Phone: +358-8-553 1161
Biocenter Oulu and | Fax: +358-8-553-1141
Department of Biochemistry | Email: andre.juffer@oulu.fi
University of Oulu, Finland | WWW: www.biochem.oulu.fi/Biocomputing/
StruBioCat | WWW: www.strubiocat.oulu.fi
NordProt | WWW: www.nordprot.org
Triacle Biocomputing | WWW: www.triacle-bc.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Form generation
Posted by DAVIGNON Andre - CETE NP/DIODé/PANDOC <An...@developpement-durable.gouv.fr>.
Hi,
Yes, it works. You can define forms dynamically. And even pass
"cocoon://make-form.jx" as a sitemap parameter.
André
Le 12/05/2009 15:31, > Andre Juffer (par Internet, dépôt
users-return-97598-andre.davignon=developpement-durable.gouv.fr@cocoon.apache.org)
a écrit :
> Hi,
>
> is the following allowed (in flow):
>
> var data = ......;
> var form = new Form("cocoon://make-form.jx", { "data" : data } );
>
> The idea is to automatically generate a form definition from given data
> with jx:forEach. The data object doesn't seem to be passed on.
>
> The make-form.jx actually does exactly what it is supposed to do. I
> tested this with
>
> var data = .....;
> cocoon.sendPage("make-form.jx", { "data" : data } );
>
> and this gives me the right form definition.
>
> If
>
> new Form("cocoon://make-form.jx", { "data" : data } );
>
> is not possible, what would be the alternative?
>
> Thanks,
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org