1 7 package org.jfox.petstore.action; 8 9 import org.jfox.framework.annotation.Service; 10 import org.jfox.mvc.ActionSupport; 11 import org.jfox.mvc.InvocationContext; 12 import org.jfox.mvc.PageContext; 13 import org.jfox.mvc.SessionContext; 14 import org.jfox.mvc.annotation.ActionMethod; 15 16 19 @Service(id = "page") 20 public class PageAction extends ActionSupport { 21 22 28 @ActionMethod(successView = "index.vhtml") 29 public void doGetIndex(InvocationContext invocationContext) throws Exception { 30 PageContext pageContext = invocationContext.getPageContext(); 31 SessionContext sessionContext = invocationContext.getSessionContext(); 32 37 pageContext.setAttribute("account", sessionContext.getAttribute("account")); 38 } 39 40 public static void main(String [] args) { 41 42 } 43 } 44 | Popular Tags |