cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angeloimm" <angelo...@libero.it>
Subject Re: Request parameters form flow script to jx
Date Fri, 17 Dec 2004 14:16:58 GMT
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


Mime
View raw message