2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.shale.blank;
21
22 import java.util.Date;
23 import org.apache.shale.view.AbstractViewController;
24
25 /***
26 * <p>Sample <code>ViewController</code> class for <code>/welcome.jsp</code>.</p>
27 */
28 public class WelcomeBean extends AbstractViewController {
29
30
31
32
33
34 /***
35 * <p>The current date and time value.</p>
36 */
37 private Date timestamp = null;
38
39
40 /***
41 * <p>Return the current date and time value.</p>
42 */
43 public Date getTimestamp() {
44
45 return this.timestamp;
46
47 }
48
49
50 /***
51 * <p>Set the current date and time value.</p>
52 *
53 * @param timestamp The new date and time value
54 */
55 public void setTimestamp(Date timestamp) {
56
57 this.timestamp = timestamp;
58
59 }
60
61
62
63
64
65 /***
66 * <p>Just before rendering occurs, set the <code>timestamp</code>
67 * property to the current date and time.</p>
68 */
69 public void prerender() {
70
71 setTimestamp(new Date());
72
73 }
74
75
76 }