1 /*
2 * Angkor Web Framework
3 *
4 * Distributable under LGPL license.
5 * See terms of license at gnu.org.
6 */
7 package com.tirsen.angkor.process;
8
9 import com.tirsen.angkor.Page;
10 import com.tirsen.angkor.RenderContext;
11
12 /***
13 * TODO document RenderPageValve
14 *
15 * <!-- $Id: RenderPageValve.java,v 1.1 2002/10/13 19:59:22 tirsen Exp $ -->
16 *
17 * @author $Author: tirsen $
18 * @version $Revision: 1.1 $
19 */
20 public class RenderPageValve implements Valve
21 {
22 private Page page;
23
24 public static final ExecuteContext.Attribute PageAttribute = new ExecuteContext.Attribute("Page");
25
26 public RenderPageValve(Page page)
27 {
28 this.page = page;
29 }
30
31 public void execute(ExecuteContext exec) throws Exception
32 {
33 exec.setAttribute(PageAttribute, page);
34 try
35 {
36 page.render((RenderContext) exec.getAttribute(ExecuteContext.RenderContextAttribute));
37 }
38 finally
39 {
40 exec.setAttribute(PageAttribute, null);
41 }
42 }
43 }
This page was automatically generated by Maven