Andrei Stroescu wrote:
Ok!
I made what are you tell me to do but I don't realy know how to
implement this.
My java class extends BasePage already and implements PageRenderListener
I saw an example (VLIB) from tapestry 4 package but I didn't undersand
how it works.
I made class MyEngine.java
package app.web;
import java.io.IOException;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.StaleSessionException;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.request.ResponseOutputStream;
import org.apache.tapestry.form.*;
import org.apache.tapestry.engine.BaseEngine;
import org.apache.tapestry.form.IPropertySelectionModel;
import javax.servlet.ServletException;
public class MyEngine extends BaseEngine
{
private void handleStaleSessionException(StaleSessionException ex,
IRequestCycle cycle, ResponseOutputStream output) throws IOException,
ServletException
{
System.out.println("StaleSessionException!");
MeniuCautare search= (MeniuCautare)
cycle.getPage("MeniuCautare");
cycle.activate(search);
renderResponse(cycle, output);
}
}
How should I implement this class in my application ?
Thank you
Kent Tong wrote:
Andrei Stroescu <andrei <at> ime.ro> writes:
I tried to override handleStaleSessionException in my Own Class that
excends BasePage but dindn't work.
You need to extend BaseEngine, not BasePage.
this is overriding method:
private void handleStaleSessionException(StaleSessionException ex,
IRequestCycle cycle, ResponseOutputStream output) throws IOException,
ServletException
{
System.out.println("StaleSessionException!");
SearchM search= (SearchM) cycle.getPage("SearchM");
cycle.activate(search);
}
Try:
private void handleStaleSessionException(StaleSessionException ex,
IRequestCycle cycle, ResponseOutputStream output) throws IOException,
ServletException
{
System.out.println("StaleSessionException!");
SearchM search= (SearchM) cycle.getPage("SearchM");
cycle.activate(search);
renderResponse(cycle, output);
}
--
Author of e-book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]