cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject AW: How do you redirect in Actions.
Date Tue, 05 Jun 2001 07:15:28 GMT
> Berin Loritsch wrote:
> 
> IMO, there should be two locations where it would be
> safe and correct to redirect: Sitemap, and Actions.
> 
Currently it is only possible to redirect from the sitemap.

> However, I need to know if I can still redirect from
> Actions.  If not, how will my sitemap know whether
> to redirect or not?
> 
The action's act method returns a map object. 
In the sitemap you can act on exactly this return value:

<map:act type="my_action">
   <!-- If a map object is returned -->
   <map:redirect-to uri="{key_from_map}"/> 
</map:act>
<!-- if no map object (null) is returned: -->
<map:redirect-to uri="otherwise"/>

If you return a map object you can redirect to any value
given in this map by specifying the redirect inside the 
act tag.

If your act method returns null no statement from inside
the act element is called. But the next statement directly
after the act is called.



Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================

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

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message