Examples of ActionContext

  • webwork.action.ActionContext

  • Examples of com.blogger.tcuri.appserver.ActionContext

        /**
         * {@inheritDoc}
         */
        @Override
        public Resolution execute(InterceptorChain chain) throws Exception {
            ActionContext context = ActionContext.get();
            Action action = chain.getAction();
            Class<? extends Action> actionClass = action.getClass();
            for (Field field : actionClass.getFields()) {
                Class<?> type = field.getType();
                if (type == String.class) {
                    field.set(action, context.param(field.getName()));
                } else if (type == List.class) {
                    // TODO
                }
            }
            return chain.execute();
    View Full Code Here

    Examples of com.ibatis.struts.ActionContext

        myList = null;
        authenticated = false;
      }

      public void validate() {
        ActionContext ctx = ActionContext.getActionContext();
        if (validation != null) {
          if (VALIDATE_EDIT_ACCOUNT.equals(validation) || VALIDATE_NEW_ACCOUNT.equals(validation)) {
            if (VALIDATE_NEW_ACCOUNT.equals(validation)) {
              account.setStatus("OK");
              validateRequiredField(account.getUsername(), "User ID is required.");
              if (account.getPassword() == null || account.getPassword().length() < 1 || !account.getPassword().equals(repeatedPassword)) {
                ctx.addSimpleError("Passwords did not match or were not provided.  Matching passwords are required.");
              }
            }
            if (account.getPassword() != null && account.getPassword().length() > 0) {
              if (!account.getPassword().equals(repeatedPassword)) {
                ctx.addSimpleError("Passwords did not match.");
              }
            }
            validateRequiredField(account.getFirstName(), "First name is required.");
            validateRequiredField(account.getLastName(), "Last name is required.");
            validateRequiredField(account.getEmail(), "Email address is required.");
    View Full Code Here

    Examples of com.opensymphony.xwork.ActionContext

            JspFactory jspFactory = JspFactory.getDefaultFactory();

            PageContext pageContext = jspFactory.getPageContext(this, request, response, null, true, 8192, true);

            // put the new PageContext into ActionContext
            ActionContext actionContext = ActionContext.getContext();

            actionContext.put(ServletActionContext.PAGE_CONTEXT, pageContext);

            /*
             * Must put the stack into HttpServletRequest, because the WebWork JSP
             * Taglib will use it to judge whether there are some errors in stack.
             */
            OgnlValueStack stack = ActionContext.getContext().getValueStack();

            //request.setAttribute(ServletActionContext.WEBWORK_VALUESTACK_KEY,
            // stack);
            //Moved to WebWorkPortlet doService()

            VelocityManager velocityManager = VelocityManager.getInstance();
            Context resultContext = velocityManager.createContext(stack, request, response);

            response.setContentType("text/html");

            try {
                String location = (String) ActionContext.getContext().get("template");
                Template template = velocityManager.getVelocityEngine().getTemplate(location);

                Writer writer = pageContext.getOut();
                template.merge(resultContext, writer);
                writer.flush();
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                // perform cleanup
                jspFactory.releasePageContext(pageContext);
                actionContext.put(ServletActionContext.PAGE_CONTEXT, oldPageContext);
            }

        }
    View Full Code Here

    Examples of com.opensymphony.xwork2.ActionContext

    public class SimpleServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics {
      private static final long serialVersionUID = -595817586173434580L;

      public String intercept(ActionInvocation invocation) throws Exception {
        final Object action = invocation.getAction();
        final ActionContext context = invocation.getInvocationContext();

        if (action instanceof ServletRequestAware) {
          HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST);
          ((ServletRequestAware) action).setServletRequest(request);
        }

        if (action instanceof ServletResponseAware) {
          HttpServletResponse response = (HttpServletResponse) context.get(HTTP_RESPONSE);
          ((ServletResponseAware) action).setServletResponse(response);
        }

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

    Examples of com.stimulus.struts.ActionContext

      public String configurationform() {
        try {
          config.load();
          if (getNoWaitingMessagesInNoArchiveQueue()>0) {
            ActionContext ctx = ActionContext.getActionContext();
           
            if (getServlet()!=null)
              setSimpleMessage(getMessage("config.no_archive_warning")+" "+getNoWaitingMessagesInNoArchiveQueue()+".");
          }
        } catch (ConfigurationException ce) {
    View Full Code Here

    Examples of flex.messaging.io.amf.ActionContext

      protected void internalConnect() throws IOException
      {
        serializationContext.instantiateTypes = false;
        postMethod = new ExtendedPostMethod( url );
        setHttpRequestHeaders();
        actionContext = new ActionContext();
        connected = true;
      }
    View Full Code Here

    Examples of gov.nasa.arc.mct.gui.ActionContext

            MockitoAnnotations.initMocks(this);
            executableButtonAction = new ExecutableButtonAction();
        }
       
        private final ActionContext mockActionContextObject() {
            ActionContext context = new ActionContext() {
               
                 @Override
                 public View getWindowManifestation() {
                     return View.NULL_VIEW_MANIFESTATION;
                 }
    View Full Code Here

    Examples of org.apache.struts.chain.contexts.ActionContext

            throws IOException, ServletException {
            // Wrap the request in the case of a multipart request
            request = processMultipart(request);

            // Create and populate a Context for this request
            ActionContext context = contextInstance(request, response);

            // Create and execute the command.
            try {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Using processing chain for this request");
                }

                command.execute(context);
            } catch (Exception e) {
                // Execute the exception processing chain??
                throw new ServletException(e);
            }

            // Release the context.
            context.release();
        }
    View Full Code Here

    Examples of org.apache.struts2.spi.ActionContext

                    reference[0] = null;
                }
            } else {
                // Nested invocation.
                RequestContextImpl requestContext = reference[0];
                ActionContext previous = requestContext.getActionContext();
                requestContext.setActionContext(new ActionContextImpl(invocation));
                try {
                    return callable.call();
                } finally {
                    requestContext.setActionContext(previous);
    View Full Code Here

    Examples of org.eclipse.ui.actions.ActionContext

            } else {
                action = new WorkingSetFindAction(fSite,
                        new FindReferencesInWorkingSetAction(fSite, workingSets),
                        SearchUtil.toString(workingSets));
            }
            final ActionContext context = getContext();
            if (context != null) {
                action.update(context.getSelection());
            }
            addAction(action, manager);
        }
    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.