Commits

Anonymous committed dde16e2

ActionEventListener's prepare() method is called before initialization
o patch applied

Issue Number: XW-489

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1414e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits b2646bf
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (2)

src/java/com/opensymphony/xwork2/DefaultActionInvocation.java

     protected UnknownHandler unknownHandler;
 
     protected DefaultActionInvocation(ObjectFactory objectFactory, UnknownHandler handler, ActionProxy proxy, Map extraContext) throws Exception {
-        this(objectFactory, handler, proxy, extraContext, true);
+        this(objectFactory, handler, proxy, extraContext, true, null);
     }
 
     protected DefaultActionInvocation(final ObjectFactory objectFactory, final UnknownHandler handler, final ActionProxy proxy, final Map extraContext, final boolean pushAction) throws Exception {
+        this(objectFactory, handler, proxy, extraContext, pushAction, null);
+    }
+
+    protected DefaultActionInvocation(final ObjectFactory objectFactory, final UnknownHandler handler, final ActionProxy proxy, final Map extraContext, final boolean pushAction, final ActionEventListener actionEventListener) throws Exception {
     	UtilTimerStack.profile("create DefaultActionInvocation: ", 
     			new UtilTimerStack.ProfilingBlock<Object>() {
 					public Object doProfiling() throws Exception {
 				        DefaultActionInvocation.this.extraContext = extraContext;
 				        DefaultActionInvocation.this.pushAction = pushAction;
                         DefaultActionInvocation.this.unknownHandler = handler;
-				        init();
+                        DefaultActionInvocation.this.actionEventListener = actionEventListener;
+                        init();
 						return null;
 					}
     			});

src/java/com/opensymphony/xwork2/DefaultActionProxy.java

                 throw new ConfigurationException(message);
             }
             
-            invocation = new DefaultActionInvocation(objectFactory, unknownHandler, this, extraContext);
-            if (actionEventListener != null) {
-                invocation.setActionEventListener(actionEventListener);
-            }
+            invocation = new DefaultActionInvocation(objectFactory, unknownHandler, this, extraContext, true, actionEventListener);
             resolveMethod();
         } finally {
             UtilTimerStack.pop(profileKey);