Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 99215 invoked from network); 20 Dec 2004 07:12:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Dec 2004 07:12:43 -0000 Received: (qmail 15827 invoked by uid 500); 20 Dec 2004 07:12:36 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 15401 invoked by uid 500); 20 Dec 2004 07:12:34 -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 Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 15387 invoked by uid 99); 20 Dec 2004 07:12:34 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=SPF_HELO_PASS,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of jh@schaubroeck.be designates 193.75.212.6 as permitted sender) Received: from mail2.schaubroeck.be (HELO mail2.schaubroeck.be) (193.75.212.6) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 19 Dec 2004 23:12:31 -0800 Received: (from root@localhost) by mail2.schaubroeck.be (8.12.3/8.12.3/ESMTP) id iBK7CNAI022887 for users@cocoon.apache.org; Mon, 20 Dec 2004 08:12:23 +0100 Received: from [193.74.194.207] ([193.74.194.207]) by mail2.schaubroeck.be (8.12.3/8.12.3/ESMTP) with ESMTP id iBK7CGiG022866 for ; Mon, 20 Dec 2004 08:12:16 +0100 Message-ID: <41C67B54.5070707@schaubroeck.be> Date: Mon, 20 Dec 2004 08:12:20 +0100 From: Jan Hoskens User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Request parameters form flow script to jx References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scan: by Schaubroeck X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N First thing you need to do is check your version of Form.js. It should be something like cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"); but may vary at the end with "v2/Form.js or "v3/Form.js". If you're using v2, then you're definitely in trouble, as this version doesn't support passing of a bizdata object. Otherwise you can pass a bizdata as you would when using cocoon.sendPage(): var bizdata = { "username" : model.name }; formSuccess.showForm("registration-display-pipeline", bizdata); then use it in your template with eg jexl: ${username} In the future, v2 and v3 will likely be dropped. Hopefully they do pass some functionality to "v1" when this happens. Kind Regards, Jan angeloimm wrote: > Hi... yes i have read this sample; in the flow.script there is: > > cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js"); > > function registration() { > var form = new Form("forms/registration.xml"); > > // The showForm function will keep redisplaying the form until > // everything is valid > form.showForm("registration-display-pipeline"); > > var model = form.getModel(); > var bizdata = { "username" : model.name } > cocoon.sendPage("registration-success-pipeline.jx", bizdata); > } > > As you can see it send to registration-success-pipeline.jx the bizData object.... but this is done by using cocoon.sendPage; now i'ld like to do a similar thing but by using showForm and not sendPage.... this is what mi chief wants so i have thinked to do for example: > function registration() { > var form = new Form("forms/registration.xml"); > > // The showForm function will keep redisplaying the form until > // everything is valid > form.showForm("registration-display-pipeline"); > > var model = form.getModel(); > var bizdata = { "username" : model.name }; > cocoon.request.setAttribute( "myBizData", bizData ); > > var formSuccess = new Form("forms/registration.xml"); > formSuccess.showForm("registration-display-pipeline"); > } > > The problem is that in the jx file i'm not able to recover this attribute... how can i do? > > > > ---------- Initial Header ----------- > >>>From : "Jon Evans" jon.evans@misgl.com > To : users@cocoon.apache.org > Cc : > Date : Fri, 17 Dec 2004 14:04:08 +0000 > Subject : Re: Request parameters form flow script to jx > > >>Hi, >> >>On 17 Dec 2004, at 13:46, angeloimm wrote: >> >> >>>Hi... first of all thanks for your reply. Now... have you ever tried >>>it? I have tried and i have an error that says: function expected >>>instead of an Object so i can't go on this way..... can you send a >>>working sample? >> >>Take a look at the registration sample >>http://localhost:8888/samples/blocks/forms/registration >> >>It uses flow, and has a jx result page which displays your username >>with: >> >>Registration was successful for ${username}! >> >> >>Cheers, >> >>Jon >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org >>For additional commands, e-mail: users-help@cocoon.apache.org >> >> > > > > > ____________________________________________________________ > Regala e regalati Libero ADSL: 3 mesi gratis, navighi veloce e scarichi a 1.2 Mega. > Abbonati subito senza costi di attivazione su http://www.libero.it > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org