You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Johnson <jo...@soho.club.tw> on 2004/05/19 11:00:59 UTC
cform parameter
Hi!
I see a flow example describe below
var cart;
function checkout()
{
sendPageAndWait("login.xml");
var user = UserRegistry.getUser(cocoon.request.get("name"));
sendPageAndWait("shippingAddress.xml");
.......
}
can it write like
function checkout()
{
var bean = new Packages.....;
sendPageAndWait("login.xml","bean":bean);
sendPageAndWait("shippingAddress.xml","beanName":bean);
......
}
The login.xml and shippingAddress.xml is defined in sitemap as a CForm(not a
xsp or jx),like
<map:match pattern="login.xml">
<map:call function="handleForm">
<map:parameter name="function" value="form2"/>
<map:parameter name="form-definition" value="forms_model.xml"/>
<map:parameter name="bindingURI" value="forms/forms_bind.xml"/>
<map:parameter name="beanBind" value="beanName"/>
</map:call>
</map:match>
if it work,we can use the bean in form2.js
can we do this ?
Johnson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: cform parameter
Posted by Johnson <jo...@soho.club.tw>.
Hi!
I found a interesting thing.
If I use sendPageAndWait("login.xml",wid1);
where wid1 is a form.getWidget() object.
All things will pass to the second form.
But If I pass a bean,nothings will pass(the bean in the second form will be
null.
Is there something wrong!
Best Regards
Johnson
----- Original Message -----
From: "Johnson" <jo...@soho.club.tw>
To: <us...@cocoon.apache.org>
Sent: Wednesday, May 19, 2004 5:00 PM
Subject: cform parameter
> Hi!
>
> I see a flow example describe below
>
> var cart;
> function checkout()
> {
> sendPageAndWait("login.xml");
> var user = UserRegistry.getUser(cocoon.request.get("name"));
> sendPageAndWait("shippingAddress.xml");
> .......
> }
>
> can it write like
>
> function checkout()
> {
> var bean = new Packages.....;
> sendPageAndWait("login.xml","bean":bean);
> sendPageAndWait("shippingAddress.xml","beanName":bean);
> ......
> }
>
> The login.xml and shippingAddress.xml is defined in sitemap as a CForm(not
a
> xsp or jx),like
> <map:match pattern="login.xml">
> <map:call function="handleForm">
> <map:parameter name="function" value="form2"/>
> <map:parameter name="form-definition" value="forms_model.xml"/>
> <map:parameter name="bindingURI" value="forms/forms_bind.xml"/>
> <map:parameter name="beanBind" value="beanName"/>
> </map:call>
> </map:match>
>
>
> if it work,we can use the bean in form2.js
>
> can we do this ?
>
> Johnson
>
>
> ---------------------------------------------------------------------
> 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