Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 64071 invoked from network); 12 May 2009 14:23:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 May 2009 14:23:18 -0000 Received: (qmail 60341 invoked by uid 500); 12 May 2009 13:53:52 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 60290 invoked by uid 500); 12 May 2009 13:53:50 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 60281 invoked by uid 99); 12 May 2009 13:53:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 13:53:49 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of DHohls@csir.co.za designates 146.64.10.166 as permitted sender) Received: from [146.64.10.166] (HELO wabe.csir.co.za) (146.64.10.166) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 13:53:38 +0000 X-CSIR-MailScanner-Watermark: 1242741070.85127@IVHhoDWJ9DGHF4nTOjl5UA Received: from pta-emo.csir.co.za (pta-emo.csir.co.za [146.64.100.109]) by wabe.csir.co.za (8.14.2/8.14.2) with ESMTP id n4CDpAqn022248 for ; Tue, 12 May 2009 15:51:10 +0200 Received: from PTA-EMO-MTA by pta-emo.csir.co.za with Novell_GroupWise; Tue, 12 May 2009 15:51:04 +0200 Message-Id: <4A099AC1.5CE9.00D4.0@csir.co.za> X-Mailer: Novell GroupWise Internet Agent 7.0.3 Date: Tue, 12 May 2009 15:50:52 +0200 From: "Derek Hohls" To: Subject: Re: Form generation References: <4A097A27.4050307@oulu.fi> In-Reply-To: <4A097A27.4050307@oulu.fi> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartF9D2B7AC.0__=" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0rc1 (wabe.csir.co.za [146.64.10.166]); Tue, 12 May 2009 15:51:10 +0200 (SAST) X-CSIR-MailScanner-Information: Please contact the ISP for more information X-CSIR-MailScanner-ID: n4CDpAqn022248 X-CSIR-MailScanner: Found to be clean X-CSIR-MailScanner-From: dhohls@csir.co.za X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No --=__PartF9D2B7AC.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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-f= orm--td21684221.html=20 The answer there is the approach I adopted. =20 Derek >>> On 2009/05/12 at 03:31, in message <4A097A27.4050307@oulu.fi>, Andre Ju= ffer wrote: Hi, is the following allowed (in flow): var data =3D ......; var form =3D new Form("cocoon://make-form.jx", { "data" : data } ); The idea is to automatically generate a form definition from given data=20 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=20 tested this with var data =3D .....; 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? --=20 This message is subject to the CSIR's copyright terms and conditions, e-mai= l legal notice, and implemented Open Document Format (ODF) standard.=20 The full disclaimer details can be found at http://www.csir.co.za/disclaime= r.html. This message has been scanned for viruses and dangerous content by MailScan= ner,=20 and is believed to be clean. MailScanner thanks Transtec Computers for the= ir support. --=__PartF9D2B7AC.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Funny you should ask that; i had the same issue myself a while back:
 
Derek

>>> On 2009/05/12 at 03:31, in message <4A097A27.40503= 07@oulu.fi>, Andre Juffer <andre.juffer@oulu.fi> wrote:
Hi,

is the following allo= wed (in flow):

var data =3D ......;
var form =3D 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 ob= ject doesn't seem to be passed on.

The make-form.jx actually does ex= actly what it is supposed to do. I
tested this with

var data =3D= .....;
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?



--=20
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,=20
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
--=__PartF9D2B7AC.0__=--