Package javax.swing

Examples of javax.swing.ActionMapTest$ActionProxy


   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here


        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

        return proxy;
    }
   
    protected String getActionBeanName(ActionContext context, Class objClass, String ownerProperty)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        if (ownerProperty==null)
            return proxy.getActionName()+ "." + objClass.getName();
        // Default
        return proxy.getActionName()+ "." + ownerProperty + "." + objClass.getName();
    }
View Full Code Here

   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here

        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

        return proxy;
    }
   
    protected String getActionBeanName(ActionContext context, Class<?> objClass, String ownerProperty)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        if (ownerProperty==null)
            return proxy.getActionName()+ "." + objClass.getName();
        // Default
        return proxy.getActionName()+ "." + ownerProperty + "." + objClass.getName();
    }
View Full Code Here

    HttpServletRequest request = (HttpServletRequest) ac
        .get(ServletActionContext.HTTP_REQUEST);

    if (!(request instanceof GaeMultiPartRequestWrapper)) {
      if (LOG.isDebugEnabled()) {
        ActionProxy proxy = invocation.getProxy();
        LOG.debug(getTextMessage(
            "struts.messages.bypass.request",
            new Object[] { proxy.getNamespace(),
                proxy.getActionName() }, ac.getLocale()));
      }

      return invocation.invoke();
    }
View Full Code Here

    /* (non-Javadoc)
     * @see com.opensymphony.xwork2.interceptor.MethodFilterInterceptor#doIntercept(com.opensymphony.xwork2.ActionInvocation)
     */
    protected String doIntercept(ActionInvocation actionInvocation) throws Exception {
        ActionProxy proxy = actionInvocation.getProxy();
        String name = getBackgroundProcessName(proxy);
        ActionContext context = actionInvocation.getInvocationContext();
        Map session = context.getSession();
        HttpSession httpSession = ServletActionContext.getRequest().getSession(true);

        Boolean secondTime  = true;
        if (executeAfterValidationPass) {
            secondTime = (Boolean) context.get(KEY);
            if (secondTime == null) {
                context.put(KEY, true);
                secondTime = false;
            } else {
                secondTime = true;
                context.put(KEY, null);
            }
        }

        //sync on the real HttpSession as the session from the context is a wrap that is created
        //on every request
        synchronized (httpSession) {
            BackgroundProcess bp = (BackgroundProcess) session.get(KEY + name);

            if ((!executeAfterValidationPass || secondTime) && bp == null) {
                bp = getNewBackgroundProcess(name, actionInvocation, threadPriority);
                session.put(KEY + name, bp);
                performInitialDelay(bp); // first time let some time pass before showing wait page
                secondTime = false;
            }

            if ((!executeAfterValidationPass || !secondTime) && bp != null && !bp.isDone()) {
                actionInvocation.getStack().push(bp.getAction());

        final String token = TokenHelper.getToken();
        if (token != null) {
          TokenHelper.setSessionToken(TokenHelper.getTokenName(), token);
                }

                Map results = proxy.getConfig().getResults();
                if (!results.containsKey(WAIT)) {
                    if (LOG.isWarnEnabled()) {
                  LOG.warn("ExecuteAndWait interceptor has detected that no result named 'wait' is available. " +
                            "Defaulting to a plain built-in wait page. It is highly recommend you " +
                            "provide an action-specific or global result named '" + WAIT +
View Full Code Here

        params.put("@java.lang.System@exit(1).dummy", "dumb value");

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.MODEL_DRIVEN_PARAM_TEST, extraContext);
        assertEquals(Action.SUCCESS, proxy.execute());

        ModelDrivenAction action = (ModelDrivenAction) proxy.getAction();
        TestBean model = (TestBean) action.getModel();

        String property = System.getProperty("xwork.security.test");
        assertNull(property);
    }
View Full Code Here

        params.put("count", "15");

        HashMap<String, Object> extraContext = new HashMap<String, Object>();
        extraContext.put(ActionContext.PARAMETERS, params);

        ActionProxy proxy = actionProxyFactory.createActionProxy("", MockConfigurationProvider.MODEL_DRIVEN_PARAM_TEST, extraContext);
        assertEquals(Action.SUCCESS, proxy.execute());

        ModelDrivenAction action = (ModelDrivenAction) proxy.getAction();
        TestBean model = (TestBean) action.getModel();
        assertEquals(nameVal, model.getName());
        assertEquals(15, model.getCount());
        assertEquals(fooVal, action.getFoo());
    }
View Full Code Here

TOP

Related Classes of javax.swing.ActionMapTest$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.