tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Peterson (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-1601) The no-params onActivate() method is called even if a context is supplied
Date Mon, 25 Jun 2007 22:09:26 GMT
The no-params onActivate() method is called even if a context is supplied

                 Key: TAPESTRY-1601
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1601
             Project: Tapestry
          Issue Type: Bug
    Affects Versions: 5.0.4, 5.0.3, 5.0.5
            Reporter: David Peterson

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.

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?

Suggested fixes (in order of preference):
- Allow a page to be returned from setupRender()
- Do not call onActivate() if onActivate(context) has already been called
- Provide another event after all the onActivate() methods have been called

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message