cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Geissel" <ageis...@zenark.com>
Subject Re: [C2.0rc1]: Redirects and Requests - passing parameters
Date Mon, 15 Oct 2001 15:22:03 GMT
Thanks Carsten,

This has clarified the situation with respect to request-object - and the
ability to 'fall-through' to an internal request using the cocoon: protocol
has tidied up my sitemap no end (not big - yet!).

Cheers
Adrian
C2 - The Bee's Knees!

----- Original Message -----
From: Carsten Ziegeler <cziegeler@sundn.de>
To: <cocoon-users@xml.apache.org>
Sent: Monday, October 15, 2001 2:10 PM
Subject: AW: [C2.0rc1]: Redirects and Requests - passing parameters


> Hi Adrian,
>
> > -----Urspr√ľngliche Nachricht-----
> > Von: Adrian Geissel [mailto:ageissel@zenark.com]
> > Gesendet: Montag, 15. Oktober 2001 13:21
> > An: cocoon-users@xml.apache.org
> > Betreff: [C2.0rc1]: Redirects and Requests - passing parameters
> >
> >
> > Hi.,
> >
> > Got a question about constructing a particular site-map process flow.
> >
> > What we are trying to achieve is the following:
> >
> > Present a form to the user
> > Process the request with parameters in an Action
> > On Success - redirect to the next logical page (not a problem)
> > On Fail - we want to redirect back to the original form, passing
> > the request
> > parameters (for field re-population) and an error message.
> >
> > I have looked, but not found, how to pass the original request object to
a
> > redirect target (so that getParameter() and getAttribute() work).
> > Is this possible? If so, how is the sitemap configured? If not,
> > does anyone
> > have experience of doing something similar?
> >
> Using redirects is not possible, as you can't "redirect" the attributes.
> One solution would be to use sessions and to store your information
> there.
>
> > Possibly related is how the internal 'cocoon:' redirect protocol works.
> Yes, the cocoon: protocol works this way and that is exactly another
> solution you could use:
> <map:match pattern="start"/>
> <map:act type="YOURACTION">
>   <!-- success -->
>   <map:generate src="cocoon:next-page"/>
>   <map:serialize type="html"/>
> </map:act>
> <!-- fail -->
>   <map:generate src="cocoon:fail-page"/>
>   <map:serialize type="html"/>
> </map:match>
>
> <map:match pattern="next-page"/>
>    <!-- your next page -->
> </map:match>
>
> <map:match pattern="fail-page"/>
>    <!-- your form page -->
> </map:match>
>
> Your pipeline "start" is invoked by the form, your action tests
> the values. if successfull, the internal cocoon: protocol is
> used to process the request. The next-page pipeline
> is invoked and gets all parameters and attributes the original
> "start" pipeline got.
> The Same applies to the fail-page.
>
> HTH
>
> Carsten
> >
> > Many thanks,
> > Adrian
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message