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 org.apache.commons.logging.Log;
28 import org.apache.commons.logging.LogFactory;
29
30
31 /**
32 * <p>Backing bean for the <code>mainMenu.jsp</code> page.</p>
33 */
34
35 public class MainMenuBacking extends AbstractBacking {
36
37
38
39
40
41 private static final Log log = LogFactory.getLog(MainMenuBacking.class);
42
43
44
45
46
47 /**
48 * <p>Forward to the <em>Edit Registration</em> action.</p>
49 */
50 public String edit() {
51
52 if (log.isDebugEnabled()) {
53 log.debug("edit()");
54 }
55 FacesContext context = FacesContext.getCurrentInstance();
56 StringBuffer sb = registration(context);
57 sb.append("?action=Edit");
58 forward(context, sb.toString());
59 return (null);
60
61 }
62
63
64 /**
65 * <p>Forward to the <em>Logoff</em> action.</p>
66 */
67 public String logoff() {
68
69 if (log.isDebugEnabled()) {
70 log.debug("logoff()");
71 }
72 FacesContext context = FacesContext.getCurrentInstance();
73 forward(context, logoff(context).toString());
74 return (null);
75
76 }
77
78
79 }