Hi.... first of all thanks for your reply.
What i want to do is a thing like this:
flow-script:

function upload() {

    var form = new Form("forms/upload_model.xml");
    var k = form.showForm("upload-display-pipeline");

    k.invalidate();

    cocoon.sendPage("upload-success-pipeline.jx",
        {
            uploadContent: handleUpload(form),
            username: form.lookupWidget("user").getValue(),
            filename: 
form.lookupWidget("upload").getValue().getHeaders().get("filename")
        }
    );
}


upload-success-pipeline.jx:


<page>
  <title>Sample form result</title>
  <content>
    User '${username}' uploaded file '${filename}' whose content is :
    <br/>
    <pre>
${uploadContent}
    </pre>
  </content>
</page>

As you can see there is no field called uploadContent or username or 
filename.... but by using:  '${username}' we can recover the username value.... 
can't i do a similar thing by using CForm?
---------- Initial Header -----------

>From      : [EMAIL PROTECTED]
To          : "Help Cocoon" [EMAIL PROTECTED]
Cc          :
Date      : Thu, 16 Dec 2004 17:50:38 +0200 (EET)
Subject : Re: Passing some parameters to a Form by using shoForm

> On Thu, 16 Dec 2004, angeloimm wrote:
>
>
> hi
>
> i guess that you want to set a value in a widget before display the form
> you can check this thread
> http://marc.theaimsgroup.com/?t=110320352200003&r=1&w=2
>
> or set value this weay :
> var form = new form("yourForm.xml");
> form.lookupWidget("widgetNameYouAreLookingFor").value = "value";
>
> -- stavros
>
>
> > Hi all.
> > I want to pass some parameters to a form by using the showForm method.
> > I.E; let's imagine we are in a flow script. Now by using sendPage we can do:
> > 
> > cocoon.sendPage( "MyPage.jx", {"key":value, "key1":value1} )
> > 
> > Now how can i do a similar thing by using showForm? I have tried to do:
> >
> > var form = new Form("myForm.xml");
> > form.showForm( "myTemplate.jx", {"key":value, "key1":value1} );
> >
> > but i have an error that says to me that showForm wants a function instead 
> > of these parameters.... so i have tried:
> >
> > var form = new Form("myForm.xml");
> > form.showForm( "myTemplate.jx", function(){var key = "key"; var value = 
> > value; } );
> >
> > but how can i recover these parameters in the page?
> > Thanks to all
>
>
>
> ____________________________________________________________
> 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 



____________________________________________________________
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to