You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ravi Hegde <Ra...@coreobjects.com> on 2004/06/03 15:54:40 UTC
cycle.activate in prepareForRender throws exception
Hi,
This is my page class. I override prepareForRender and do some setup before rendering. I invoke superclass prepareForRender. After that, depending on some condition, I am activating another page. Doing this leads to the exception (shown at the end). Throwing PageRedirectException works fine. Is there any better way of handling this sutuation ?
public class MyPage extends BasePage
{
protected void prepareForRender(IRequestCycle cycle)
{
//Invoking super class method
super.prepareForRender(cycle);
//
//Doing some setup here ....
//...
//Something went wrong.... activate "OtherPage"
OtherPage otherPage = (OtherPage) cycle.getPage("OtherPage");
otherPage.setSomeProperty("SomeValue");
cycle.activate(otherPage);
}
}
org.apache.tapestry.ApplicationRuntimeException
-----------------------------------------------
Class com.ravih.MyPage overrides method 'prepareForRender()' but does not invoke the super-class implementation.
Stack Trace:
org.apache.tapestry.Tapestry.checkMethodInvocation(Tapestry.java:1351)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:896)
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:341)
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:412)
org.apache.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java:773)
org.apache.tapestry.engine.PageService.service(PageService.java:118)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:913)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:238)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:199)
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org