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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]