1 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 29 30 public class MainMenuBacking extends AbstractBacking { 31 32 33 35 36 private static final Log log = LogFactory.getLog(MainMenuBacking.class); 37 38 39 41 42 45 public String edit() { 46 47 if (log.isDebugEnabled()) { 48 log.debug("edit()"); 49 } 50 FacesContext context = FacesContext.getCurrentInstance(); 51 StringBuffer sb = registration(context); 52 sb.append("?action=Edit"); 53 forward(context, sb.toString()); 54 return (null); 55 56 } 57 58 59 62 public String logoff() { 63 64 if (log.isDebugEnabled()) { 65 log.debug("logoff()"); 66 } 67 FacesContext context = FacesContext.getCurrentInstance(); 68 forward(context, logoff(context).toString()); 69 return (null); 70 71 } 72 73 74 } 75 | Popular Tags |