Can you help me? What I'm trying to do is redirect to another page, if my
page has not been given any context.

Something like this:

   Object onActivate(String context) {
        if (context == null) {
             return _otherPage;
        }
        return null;
   }

Unfortunately that method does not get run if the context is missing.

So, I tried:

   Object onActivate() {
         return _otherPage;
   }

But this method is run even if there is a context. And it's run before the
other one, so I can't even set a flag. I've tried returning the page from
setupRender() instead, but that expects a boolean result and doesn't work.
So, what do I do?

And a related question: how can I do a: response.sendError(404, "Entry not
found"); This works, but I get an error in the logs - the
PageRenderRequestHandler is still trying to render a (non-existent)
document.

Thanks,
David

Reply via email to