karnowski wrote:
Greetings,
In the constructor of my webpages I'm wanting to do a validity check and if
it fails redirect to a different page. So I'm doing something like this:
public class OriginalPage extends WebPage {
public OriginalPage() {
...
if(!validityCheck()) {
setResponsePage(new DifferentPage());
}
...
}
...
}
But I'm getting inconsistent results for different web pages. When the
validity check fails it always appears to call the "setResponsePage()" but
sometimes will display the DifferentPage in the browser (i.e. what I want)
but sometimes continues to display the OriginalPage (not what I want).
Am I not supposed to be doing a setResponsePage() in a webpage's
constructor? Is setResponsePage() only for form/ajax submission? How can I
accomplish what I'm after here?
throw new RestartResponseException(DifferentPage.class);
Regards,
Al
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]