Re: Using Cookies with Interceptors

tm_jee <[email protected]> Wed, 06 Dec 2006 09:44:26 CST
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <24225407.1165419899264.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
From DefaultActionInvocation

[code]
public String invoke() throws Exception {
        if (executed) {
            throw new IllegalStateException("Action has already executed");
        }

        if (interceptors.hasNext()) {
            InterceptorMapping interceptor = (InterceptorMapping) interceptors.next();
            resultCode = interceptor.getInterceptor().intercept(this);
        } else {
            resultCode = invokeActionOnly();
        }

        // this is needed because the result will be executed, then control will return to the Interceptor, which will
        // return above and flow through again
        if (!executed) {
            if (preResultListeners != null) {
                for (Iterator iterator = preResultListeners.iterator();
                     iterator.hasNext();) {
                    PreResultListener listener = (PreResultListener) iterator.next();
                    listener.beforeResult(this, resultCode);
                }
            }

            // now execute the result, if we're supposed to
            if (proxy.getExecuteResult()) {
                executeResult();
            }

            executed = true;
        }

        return resultCode;
    }
[/code]

Yup, you are correct Phil, I'll make the changes :)
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=52119&messageID=105541#105541

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]