Examples of PreResultListener


Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            session.put(PREVIOUS_FLOW_ACTION, prevAction);
        }

        // execute global view result on not last flow action
        if (flowAction && nextAction.equals(actionName) && !lastFlowAction) {
            invocation.addPreResultListener(new PreResultListener() {
                public void beforeResult(ActionInvocation invocation,
                        String resultCode) {
                    if (Action.SUCCESS.equals(resultCode)) {
                        // action flow aware
                        String nextFromAction = null;
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

                    LOG.warn("conversion error value is not a String or array of String but instead is [" + value + "], will not repopulate conversion error");
                }
            }

            if (doExprOverride) {
                invocation.addPreResultListener(new PreResultListener() {
                    public void beforeResult(ActionInvocation invocation, String resultCode) {
                        ValueStack stack = ActionContext.getContext().getValueStack();
                        stack.setExprOverrides(fakeParams);
                    }
                });
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            // 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 (Object preResultListener : preResultListeners) {
                        PreResultListener listener = (PreResultListener) preResultListener;

                        String _profileKey = "preResultListener: ";
                        try {
                            UtilTimerStack.push(_profileKey);
                            listener.beforeResult(this, resultCode);
                        }
                        finally {
                            UtilTimerStack.pop(_profileKey);
                        }
                    }
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

    if (fakie != null) {
      // if there were some errors, put the original (fake) values in
      // place right before the result
      stack.getContext().put(ORIGINAL_PROPERTY_OVERRIDE, fakie);
      invocation.addPreResultListener(new PreResultListener() {
        public void beforeResult(ActionInvocation invocation,
            String resultCode) {
          Map fakie = (Map) invocation.getInvocationContext().get(
              ORIGINAL_PROPERTY_OVERRIDE);
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            // 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 (Object preResultListener : preResultListeners) {
                        PreResultListener listener = (PreResultListener) preResultListener;

                        String _profileKey = "preResultListener: ";
                        try {
                            UtilTimerStack.push(_profileKey);
                            listener.beforeResult(this, resultCode);
                        }
                        finally {
                            UtilTimerStack.pop(_profileKey);
                        }
                    }
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

    private void overrideActionValues(
        ActionInvocation invocation, ValueStack stack, final HashMap<Object, Object> propertyOverrides
    )
    {
        invocation.addPreResultListener( new PreResultListener()
        {
            @Override
            public void beforeResult( ActionInvocation invocation, String resultCode )
            {
                invocation.getStack().setExprOverrides( propertyOverrides );
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            session.put(PREVIOUS_FLOW_ACTION, prevAction);
        }

        // execute global view result on not last flow action
        if (flowAction && nextAction.equals(actionName) && !lastFlowAction) {
            invocation.addPreResultListener(new PreResultListener() {
                public void beforeResult(ActionInvocation invocation,
                        String resultCode) {
                    if (Action.SUCCESS.equals(resultCode)) {
                        // action flow aware
                        String nextFromAction = null;
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            final ActionContext ctx = ActionContext.getContext();
            String type = getParameter(DEBUG_PARAM);
            ctx.getParameters().remove(DEBUG_PARAM);
            if (XML_MODE.equals(type)) {
                inv.addPreResultListener(
                        new PreResultListener() {
                            public void beforeResult(ActionInvocation inv, String result) {
                                printContext();
                            }
                        });
            } else if (CONSOLE_MODE.equals(type)) {
                consoleEnabled = true;
                inv.addPreResultListener(
                        new PreResultListener() {
                            public void beforeResult(ActionInvocation inv, String actionResult) {
                                String xml = "";
                                if (enableXmlWithConsole) {
                                    StringWriter writer = new StringWriter();
                                    printContext(new PrettyPrintWriter(writer));
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

                // opps... it should be
                LOG.warn("conversion error value is not a String or array of String but instead is [" + value + "], will not repopulate conversion error");
            }

            if (doExprOverride) {
                invocation.addPreResultListener(new PreResultListener() {
                    public void beforeResult(ActionInvocation invocation, String resultCode) {
                        ValueStack stack = ActionContext.getContext().getValueStack();
                        stack.setExprOverrides(fakeParams);
                    }
                });
View Full Code Here

Examples of com.opensymphony.xwork2.interceptor.PreResultListener

            // 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 (Object preResultListener : preResultListeners) {
                        PreResultListener listener = (PreResultListener) preResultListener;

                        String _profileKey = "preResultListener: ";
                        try {
                            UtilTimerStack.push(_profileKey);
                            listener.beforeResult(this, resultCode);
                        }
                        finally {
                            UtilTimerStack.pop(_profileKey);
                        }
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.