Salome HOME
Correct redirect end of session during check-out operation
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / SimanRedirectOnEndOfSessionInterceptor.java
index 5beec983472f9245be352de69f7942ae707d6020..f25c9021911e16f6d8417cfd25ca6b1b8c7a50a1 100644 (file)
@@ -55,6 +55,19 @@ public class SimanRedirectOnEndOfSessionInterceptor extends
        public void setGlobalResultActionName(final String globalResultActionName) {
                _globalResultActionName = globalResultActionName;
        }
+       
+       /**
+        * {@inheritDoc}
+        * 
+        * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
+        */
+       public String intercept(final ActionInvocation invocation) throws Exception { //NOPMD: RKV: because of struts invoke() method
+               String result = super.intercept(invocation);
+               if (result.equals(getGlobalResult())) { //Redirect happened
+                       ((Action)invocation.getAction()).setMessage("");
+               }
+               return result;
+       }
 
        /**
         * {@inheritDoc}