1. opensymphony
  2. xwork

Commits

mrdon  committed 61befa3

Made it possible to get the parameter map from another location

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1666e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 519cfb6
  • Branches master

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork2/interceptor/ParametersInterceptor.java

View file
  • Ignore whitespace
         Object action = invocation.getAction();
         if (!(action instanceof NoParameters)) {
             ActionContext ac = invocation.getInvocationContext();
-            final Map parameters = ac.getParameters();
+            final Map parameters = retrieveParametersFromContext(ac);
 
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Setting params " + getParameterLogMap(parameters));
         return invocation.invoke();
     }
 
+    /**
+     * Gets the parameter map to apply from the context
+     * @param ac The action context
+     * @return The parameter map to apply
+     */
+    protected Map retrieveParametersFromContext(ActionContext ac) {
+        return ac.getParameters();
+    }
+
     protected void setParameters(Object action, ValueStack stack, final Map parameters) {
         ParameterNameAware parameterNameAware = (action instanceof ParameterNameAware)
                 ? (ParameterNameAware) action : null;