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.examples.test.view;
21
22 import javax.faces.context.FacesContext;
23 import org.apache.shale.view.AbstractViewController;
24 import org.apache.shale.view.faces.FacesConstants;
25
26 /***
27 * <p>View Controller class for <code>/standard.jsp</code>.
28 * This class implements the <code>ViewController</code> interface,
29 * so it should receive lifecycle event callbacks.</p>
30 */
31 public class Standard extends AbstractViewController {
32
33
34
35
36
37 /***
38 * <p>Sequence number for identifying order of event callbacks.</p>
39 */
40 private int sequence = 0;
41
42
43
44
45
46 /***
47 * <p>Calling order for the init() method.</p>
48 */
49 private int initCalled = 0;
50
51 public int getInitCalled() {
52 return initCalled;
53 }
54
55
56 /***
57 * <p>Calling order for the preprocess() method.</p>
58 */
59 private int preprocessCalled = 0;
60
61 public int getPreprocessCalled() {
62 return preprocessCalled;
63 }
64
65
66 /***
67 * <p>Calling order for the prerender() method.</p>
68 */
69 private int prerenderCalled = 0;
70
71 public int getPrerenderCalled() {
72 return prerenderCalled;
73 }
74
75
76 /***
77 * <p>Calling order for the destroy() method.</p>
78 */
79 private int destroyCalled = 0;
80
81 public int getDestroyCalled() {
82 return destroyCalled;
83 }
84
85
86
87
88
89
90
91 public void init() {
92 initCalled = ++sequence;
93 }
94
95 public void preprocess() {
96 preprocessCalled = ++sequence;
97 }
98
99 public void prerender() {
100 prerenderCalled = ++sequence;
101 }
102
103 public void destroy() {
104 destroyCalled = ++sequence;
105 }
106
107
108
109
110
111
112 public String resubmit() {
113 return null;
114 }
115
116
117 }