mirror of
https://github.com/apache/struts.git
synced 2026-08-06 15:17:00 +00:00
Fixing javadoc, minor code improvements
WW-2589 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@647439 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -56,12 +56,12 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
* <pre>
|
||||
* <!-- START SNIPPET: dwrConfiguration -->
|
||||
*
|
||||
* <dwr<
|
||||
* <allow<
|
||||
* <create creator="new" javascript="validator" class="org.apache.struts2.validators.DWRValidator"/<
|
||||
* <convert converter="bean" match="com.opensymphony.xwork2.ValidationAwareSupport"/<
|
||||
* </allow<
|
||||
* </dwr<
|
||||
* <dwr>
|
||||
* <allow>
|
||||
* <create creator="new" javascript="validator" class="org.apache.struts2.validators.DWRValidator"/>
|
||||
* <convert converter="bean" match="com.opensymphony.xwork2.ValidationAwareSupport"/>
|
||||
* </allow>
|
||||
* </dwr>
|
||||
*
|
||||
* <!-- END SNIPPET: dwrConfiguration -->
|
||||
* </pre>
|
||||
@@ -69,19 +69,6 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
|
||||
public class DWRValidator {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(DWRValidator.class);
|
||||
|
||||
private ActionProxyFactory actionProxyFactory;
|
||||
private ActionMapper actionMapper;
|
||||
|
||||
@Inject
|
||||
public void setActionMapper(ActionMapper actionMapper) {
|
||||
this.actionMapper = actionMapper;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public void setActionProxyFactory(ActionProxyFactory fac) {
|
||||
this.actionProxyFactory = fac;
|
||||
}
|
||||
|
||||
public ValidationAwareSupport doPost(String namespace, String action, Map params) throws Exception {
|
||||
HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();
|
||||
ServletContext servletContext = WebContextFactory.get().getServletContext();
|
||||
@@ -106,8 +93,10 @@ public class DWRValidator {
|
||||
servletContext);
|
||||
|
||||
try {
|
||||
ActionMapper actionMapper = du.getContainer().getInstance(ActionMapper.class);
|
||||
ActionMapping mapping = actionMapper.getMappingFromActionName(action);
|
||||
ActionInvocation inv = new ValidatorActionInvocation(ctx, true);
|
||||
ActionProxyFactory actionProxyFactory = du.getContainer().getInstance(ActionProxyFactory.class);
|
||||
ActionProxy proxy = actionProxyFactory.createActionProxy(inv, namespace, mapping.getName(), mapping.getMethod(), true, true);
|
||||
proxy.execute();
|
||||
Object a = proxy.getAction();
|
||||
|
||||
Reference in New Issue
Block a user