View Javadoc

1   package org.appfuse.webapp.pages;
2   
3   import org.apache.tapestry5.Asset;
4   import org.apache.tapestry5.annotations.Path;
5   import org.apache.tapestry5.annotations.Property;
6   import org.apache.tapestry5.ioc.Messages;
7   import org.apache.tapestry5.ioc.annotations.Inject;
8   import org.apache.tapestry5.services.PageRenderLinkSource;
9   
10  /**
11   * Page to handle 403 errors 
12   * 
13   * @author Serge Eby
14   * @version $Id: AccessDenied.java 5 2008-08-30 09:59:21Z serge.eby $
15   */
16  public class AccessDenied {
17  
18      @Property
19      @Inject
20      @Path("context:images/403.jpg")
21      private Asset accessDeniedImage;
22  
23      @Inject
24      private Messages messages;
25  
26      @Inject
27      private PageRenderLinkSource pageRendererLinkSource;
28  
29      public String getaccessDeniedMessage() {
30          String url = pageRendererLinkSource.createPageRenderLink(Index.class).toURI();
31          return messages.format("403.message", url);
32      }
33  }