cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <benanderson...@gmail.com>
Subject Redirector
Date Thu, 06 Jan 2005 11:39:32 GMT
Hi,
I've written a custom action like this:

public class RedirectorAction extends AbstractAction {

    public Map act( Redirector redirector, 
                    SourceResolver resolver, 
                    Map objectModel, 
                    String source, 
                    Parameters parameters ) {
        try {
            Request request = (Request)objectModel.get("request");
            String referrerURI = request.getParameter("referrerURI");
            redirector.redirect(false, referrerURI);

The reason I wrote this is because I have a pipeline which I want to
execute some db updates via the sqltransformer.  But then I want to
redirect that pipeline to another pipeline based on a hidden parameter
I've kept in a form.  The problem I'm having is that when this action
runs, the sqltransformer (which is above it in the pipeline) doesn't. 
It's like the redirector.redirect() method cancels everything that was
happening.  I noticed this because when I use a view which exits the
pipeline right before this action, it works fine.  Is there a way to
get around this?  I want to issue a redirect to the client, but
process the pipeline as normal on the serverside.

Thanks,
Ben

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


Mime
View raw message