cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: AW: How do you redirect in Actions.
Date Tue, 05 Jun 2001 18:26:12 GMT
Carsten Ziegeler wrote:
> > 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.

That sucks.

> > 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"/>

Not intuitive.  We need to rethink this.

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

What if the action is part of an action set?  Redirect is
important when we are talking pure logic.  I think we need
to rethink the sitemap only thing.  It causes too much
to deal with by restricting ourselves so much.  It is unnatural
to delay redirecting to the sitemap, and then throw in some
PROGRAM logic in the sitemap.  This is mixing concerns, and I
don't like it.

What if we included the Environment object in the Action's
ObjectMap?  I think this will solve the issues for easy
programming--without relying on the site admin to not screw
up your site's security.

To unsubscribe, e-mail:
For additional commands, email:

View raw message