1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.apache.struts.webapp.example;
24
25
26 import javax.faces.context.FacesContext;
27 import javax.faces.event.ActionEvent;
28
29 import org.apache.commons.logging.Log;
30 import org.apache.commons.logging.LogFactory;
31
32
33 /**
34 * <p>Backing bean for the <code>index.jsp</code> page.</p>
35 */
36
37 public class IndexBacking extends AbstractBacking {
38
39
40
41
42
43 private static final Log log = LogFactory.getLog(IndexBacking.class);
44
45
46
47
48
49 /**
50 * <p>Forward to the <em>Create Registration</em> action.</p>
51 */
52 public String create() {
53
54 if (log.isDebugEnabled()) {
55 log.debug("create()");
56 }
57 FacesContext context = FacesContext.getCurrentInstance();
58 StringBuffer sb = registration(context);
59 sb.append("?action=Create");
60 forward(context, sb.toString());
61 return (null);
62
63 }
64 /**
65 * <p>Testing actionListener call</p>
66 * @param actionEvent
67 */
68 public void testListener(ActionEvent actionEvent){
69
70 }
71
72 /**
73 * <p>Forward to the <em>Logon</em> page.</p>
74 */
75 public String logon() {
76
77 if (log.isDebugEnabled()) {
78 log.debug("logon()");
79 }
80 return "logon";
81
82 }
83
84
85 }