You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by 黄 海冬 <li...@hotmail.com> on 2004/04/26 15:40:04 UTC
cocoon.sendPage and redirect-to not compatible?
Hi all,
In cocoon forms we always use cocoon.sendPage to show after submit,like
this code in registration.js under samples\forms\flow:
cocoon.sendPage("registration-success-pipeline.jx", bizdata);
and then in sitemap to display it.
But if I use redirect-to in this pipeline like:
<map:match pattern="registration-success-pipeline.jx">
<map:redirect-to uri="/samples/"/>
</map:match>
The page will display blank though if will redirect correctly if access
directly.When the redirect-to uri is cocoon://samples/ it works and the url
in browser is still like
http://localhost:8888/samples/blocks/forms/2a327b45557554541d6f423c5c0b3712218e8f52.continue
but this way wouldn't work under some condition. Is this a bug that not
able to redirect to an http url when using sendPage?
cocoon is current cvs version.
Roy Huang
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
Re: cocoon.sendPage and redirect-to not compatible?
Posted by Bruno Dumon <br...@outerthought.org>.
On Mon, 2004-04-26 at 15:40, 黄 海冬 wrote:
> Hi all,
> In cocoon forms we always use cocoon.sendPage to show after submit,like
> this code in registration.js under samples\forms\flow:
> cocoon.sendPage("registration-success-pipeline.jx", bizdata);
> and then in sitemap to display it.
>
> But if I use redirect-to in this pipeline like:
> <map:match pattern="registration-success-pipeline.jx">
> <map:redirect-to uri="/samples/"/>
> </map:match>
> The page will display blank though if will redirect correctly if access
> directly.When the redirect-to uri is cocoon://samples/ it works and the url
> in browser is still like
> http://localhost:8888/samples/blocks/forms/2a327b45557554541d6f423c5c0b3712218e8f52.continue
> but this way wouldn't work under some condition. Is this a bug that not
> able to redirect to an http url when using sendPage?
not really a fix for your problem, but you're aware you can do the
redirect directly in flowscript using cocoon.redirectTo instead of
cocoon.sendPage?
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org bruno@apache.org