You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/06/04 19:08:37 UTC

Page Redirection

In the code snippet below, the words "NO RESULTS" appear when program runs.
However, it isn't redirecting to the NoResults page (using either the
.setPage or the exception). When I use .setPage() it stays on this page (the
Results page), when I throw the RedirectException it gives a 404 error.

Any ideas?

Joel


	public void beginResponse(IMarkupWriter writer, IRequestCycle cycle)
		throws RequestCycleException {
		super.beginResponse(writer, cycle);
		if ( getResults().getTotalPlans() == 0 ) {
			System.out.println("NO RESULTS");
			cycle.setPage( cycle.getPage("NoResults") );
//			throw new RedirectException("NoResults");
		}
	}