mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
Changes necessary for XWork 2.1:
* New EL abstraction to allow ONGL to be replaced * Got rid of static factories and state, in favor of dep injection * New plugin API points for the EL abstraction XW-566 XW-461 XW-561 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@577728 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -43,7 +43,9 @@ import com.opensymphony.xwork2.ActionSupport;
|
||||
import com.opensymphony.xwork2.Result;
|
||||
import com.opensymphony.xwork2.inject.Inject;
|
||||
import com.opensymphony.xwork2.interceptor.PreResultListener;
|
||||
import com.opensymphony.xwork2.util.OgnlValueStack;
|
||||
import com.opensymphony.xwork2.ognl.OgnlValueStack;
|
||||
import com.opensymphony.xwork2.util.ValueStack;
|
||||
import com.opensymphony.xwork2.util.ValueStackFactory;
|
||||
|
||||
/**
|
||||
* An abstract template page filter that sets up the proper contexts for
|
||||
@@ -97,8 +99,8 @@ public abstract class TemplatePageFilter extends PageFilter {
|
||||
ServletContext servletContext = filterConfig.getServletContext();
|
||||
ActionContext ctx = ServletActionContext.getActionContext(req);
|
||||
if (ctx == null) {
|
||||
// ok, one isn't associated with the request, so let's get a ThreadLocal one (which will create one if needed)
|
||||
OgnlValueStack vs = new OgnlValueStack();
|
||||
// ok, one isn't associated with the request, so let's create one using the current Dispatcher
|
||||
ValueStack vs = Dispatcher.getInstance().getContainer().getInstance(ValueStackFactory.class).createValueStack();
|
||||
vs.getContext().putAll(Dispatcher.getInstance().createContextMap(req, res, null, servletContext));
|
||||
ctx = new ActionContext(vs.getContext());
|
||||
if (ctx.getActionInvocation() == null) {
|
||||
@@ -165,7 +167,7 @@ public abstract class TemplatePageFilter extends PageFilter {
|
||||
public void setResultCode(String resultCode) {
|
||||
}
|
||||
|
||||
public OgnlValueStack getStack() {
|
||||
public ValueStack getStack() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -182,5 +184,8 @@ public abstract class TemplatePageFilter extends PageFilter {
|
||||
|
||||
public void setActionEventListener(ActionEventListener listener) {
|
||||
}
|
||||
|
||||
public void init(ActionProxy proxy) throws Exception {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user