-Igor
On 4/6/06, Vincent Jenks <
[EMAIL PROTECTED]> wrote:
Ouch, maybe it's time to upgrade to 1.2....though I'm supposed to launch this app in a month and I don't want to use a beta or RC in production.On 4/6/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:yeah thats 1.2
in 1.1 i guess what you can do is create your own runtimeexception that takes a page, override onRuntimeException in requestcycle? application? and return that page from that method. that should work although im not sure.
-IgorOn 4/6/06, Vincent Jenks < [EMAIL PROTECTED]> wrote:I'm using 1.1.1, is that a 1.2 class?On 4/6/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:throw new RestartResponseException or throw new RestartResponseAtInterceptPageException depending on your needs.
you pass in the page you want to restart at via exception's constructor
-IgorOn 4/6/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:I'm convinced that I saw an example of what do to when one would like to end the response of a page and redirect to another...but I can't put my finger on it...so here's my problem:
In my page I'm testing for the existence of an object...if it doesn't exist I'd like to redirec to another page...but it appears to continue to try and render the page...which throws a NullReferenceException (obviously) because my object is null:
//get cart from session
final ShoppingCart cart = ((UserSession)getSession()).getCart();
if (cart == null)
setResponsePage(new EmptyCart());
I want the page to stop rendering and redirect to EmptyCart....
Thanks!
