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!