1 5 package org.exoplatform.portlet.exomvc; 6 7 import javax.portlet.ActionRequest; 8 import javax.portlet.ActionResponse; 9 import javax.portlet.RenderRequest; 10 import javax.portlet.RenderResponse; 11 import org.exoplatform.portlet.exomvc.config.Configuration; 12 13 18 public class Page { 19 final static public String VELOCITY_CONTEXT = "mvc.velocity.context" ; 20 21 final static public String PAGE_URL = "mvc.page.url" ; 22 final static public String PAGE_NAME = "mvc.page.name" ; 23 final static public String FORWARD_PAGE = "mvc.page.forward" ; 24 25 private Configuration configuration_ ; 26 private String pageName_ ; 27 28 public String getPageName() { return pageName_ ; } 29 public void setPageName(String s) { pageName_ = s ; } 30 31 public void render(RenderRequest req, RenderResponse res) throws Exception { 32 33 } 34 35 public void processAction(ActionRequest req, ActionResponse res) throws Exception { 36 37 } 38 39 public Configuration getConfiguration() { return configuration_ ; } 40 public void setConfiguration(Configuration c) { configuration_ = c ;} 41 42 public String getPageURL(RenderResponse res) { 43 return res.createActionURL().toString() + "&" + PAGE_NAME + "=" + pageName_; 44 } 45 46 public void setForwardPage(ActionResponse res, String pageName) { 47 res.setRenderParameter(FORWARD_PAGE, pageName) ; 48 } 49 } | Popular Tags |