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