Hi,

Well I have seen the following solution.
This is good.
I have some doubts on this.
Well we are using Tapestry 4.0 and Hibernate 3.0 in my application.
If I implement this methodology does it work in my application and 
Is it that BaseEngine takes care of the everything like handling the
BasePage implementation and able to run the application or do I need to call
The object of BaseEngine in my java which in turn extends BasePage to store
the data in session.

Please give ur comments on this.

Thanks,
Manjith Kumar Adapa.


-----Original Message-----
From: Andrei Stroescu [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 01, 2005 5:08 PM
To: Tapestry users
Subject: Re: overriding handleStaleSessionException

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]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to