mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
Added method to get the portlet context
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@564279 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+10
@@ -25,11 +25,13 @@ import java.util.Map;
|
||||
import javax.portlet.ActionRequest;
|
||||
import javax.portlet.ActionResponse;
|
||||
import javax.portlet.PortletConfig;
|
||||
import javax.portlet.PortletContext;
|
||||
import javax.portlet.PortletRequest;
|
||||
import javax.portlet.PortletResponse;
|
||||
import javax.portlet.RenderRequest;
|
||||
import javax.portlet.RenderResponse;
|
||||
|
||||
import org.apache.struts2.StrutsStatics;
|
||||
import org.apache.struts2.dispatcher.mapper.ActionMapping;
|
||||
import org.apache.struts2.portlet.PortletActionConstants;
|
||||
|
||||
@@ -193,5 +195,13 @@ public class PortletActionContext implements PortletActionConstants {
|
||||
public static Map getModeNamespaceMap() {
|
||||
return (Map)getContext().get(MODE_NAMESPACE_MAP);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the portlet context.
|
||||
* @return The portlet context.
|
||||
*/
|
||||
public static PortletContext getPortletContext() {
|
||||
return (PortletContext)getContext().get(StrutsStatics.STRUTS_PORTLET_CONTEXT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user