On Sun, 22 Jun 2014 22:56:46 -0300, Chris Mylonas <ch...@opencsta.org> wrote:

Ah bugger, it always happens after sending to a list or forum.

Found a suitable response to try from Listing 3.25 from Igor's book.

e.g.

Object onActivate(Long articleId) {
      this.article = blogService.findArticleById(articleId);
      if (this.article == null) {
         return new StreamPageContent(ErrorPage.class);
}
      return null;
   }

StreamPageContent doesn't redirect. Instead, it just renders another page, but in the same request.

Looks like I can return an Object/Page

Yep!

You can return ErrorPage.class or @InjectPage private ErrorPage errorPage;, set some stuff in errorPage then return it. In both cases, the user will be redirected to ErrorPage.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to