Package com.opensymphony.xwork

Examples of com.opensymphony.xwork.ActionProxy


                    getApplicationMap(request), request, response, cheatKey, cheatValue);

            contextMap.put(PORTLET_DISPATCHER, this);

            try {
                ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy(nameSpace, actionName, contextMap);
                proxy.execute();
                PortletContext.getContext().setActionExecuted(null);

            } catch (Throwable e) {
                e.printStackTrace();
            }
View Full Code Here


    }

    public void testExecute() {
        try {

            ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", "hello", extraContext);
            proxy.setExecuteResult(false);
            String result = proxy.execute();

            String userName = ((HelloAction) proxy.getAction()).getUserName();
            assertEquals(result, "success");
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }
View Full Code Here

        }
    }

   
    private HelloAction execute() throws Exception {
        ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", "hello", extraContext);
        proxy.setExecuteResult(false);
        proxy.execute();
        return (HelloAction) proxy.getAction();
    }
View Full Code Here

     *
     */
    public void testMyMethod() {
       
        try {
            ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", "formProcessing!myMethod", extraContext);
            proxy.setExecuteResult(false);
            System.out.println(proxy.execute());
            FormProcessingAction action = (FormProcessingAction)proxy.getAction();
            action.execute();
            assertEquals("fileHello", action.getFile());
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

            e.printStackTrace();
        }
       
    }
    private FormProcessingAction execute() throws Exception {
        ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy("", "formProcessing", extraContext);
        proxy.setExecuteResult(false);
        proxy.execute();
        return (FormProcessingAction) proxy.getAction();
    }
View Full Code Here

        try
        {
            prepareContinuationAction(request, extraContext);

            ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy(actionDefinition.getNamespace(), actionDefinition.getAction(), extraContext, actionDefinition.isExecuteResult(), false);
            proxy.setMethod(actionDefinition.getMethod());
            request.setAttribute(ServletActionContext.WEBWORK_VALUESTACK_KEY, proxy.getInvocation().getStack());

            // if the ActionMapping says to go straight to a result, do it!
            if (mapping.getResult() != null)
            {
                Result result = mapping.getResult();
                result.execute(proxy.getInvocation());
            }
            else
            {
                proxy.execute();
            }

            return proxy.getInvocation();
        }
        catch (ConfigurationException ce)
        {
            throw new ServletException("Cannot invoke action '" + actionDefinition.getAction() + "' in namespace '" + actionDefinition.getNamespace() + "'", ce);
        }
View Full Code Here

        dbg.append( "[" ).append( hint ).append( "] " );
        dbg.append( ".intercept(" ).append( invocation.getClass().getName() ).append( ")" );
        dbg.append( "\n Action=" ).append( invocation.getAction().getClass().getName() );

        ActionProxy proxy = invocation.getProxy();
        dbg.append( "\n Proxy=" ).append( proxy.getClass().getName() );
        dbg.append( "\n    .namespace  =" ).append( proxy.getNamespace() );
        dbg.append( "\n    .actionName =" ).append( proxy.getActionName() );
        dbg.append( "\n    .method     =" ).append( proxy.getMethod() );
        dbg.append( "\n    .execute result =" ).append( proxy.getExecuteResult() );

        ActionContext context = invocation.getInvocationContext();
        dbg.append( "\n InvocationContext=" ).append( context.getClass().getName() );
        appendMap( "\n    .session=", dbg, context.getSession() );
        appendMap( "\n    .parameters=", dbg, context.getParameters() );
View Full Code Here

        dbg.append( "[" ).append( hint ).append( "] " );
        dbg.append( ".intercept(" ).append( invocation.getClass().getName() ).append( ")" );
        dbg.append( "\n Action=" ).append( invocation.getAction().getClass().getName() );

        ActionProxy proxy = invocation.getProxy();
        dbg.append( "\n Proxy=" ).append( proxy.getClass().getName() );
        dbg.append( "\n    .namespace  =" ).append( proxy.getNamespace() );
        dbg.append( "\n    .actionName =" ).append( proxy.getActionName() );
        dbg.append( "\n    .method     =" ).append( proxy.getMethod() );
        dbg.append( "\n    .execute result =" ).append( proxy.getExecuteResult() );

        ActionContext context = invocation.getInvocationContext();
        dbg.append( "\n InvocationContext=" ).append( context.getClass().getName() );
        appendMap( "\n    .session=", dbg, context.getSession() );
        appendMap( "\n    .parameters=", dbg, context.getParameters() );
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork.ActionProxy

Copyright © 2018 www.massapicom. 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.