Package org.g4studio.core.mvc.xstruts.config

Examples of org.g4studio.core.mvc.xstruts.config.ForwardConfig


    // Process forwards extensions.
    ForwardConfig[] forwards = config.findForwardConfigs();

    for (int i = 0; i < forwards.length; i++) {
      ForwardConfig forward = forwards[i];

      processForwardExtension(forward, config);
    }

    for (int i = 0; i < forwards.length; i++) {
      ForwardConfig forward = forwards[i];

      // Verify that required fields are all present for the forward
      if (forward.getPath() == null) {
        handleValueRequiredException("path", forward.getName(), "global forward");
      }
    }
  }
View Full Code Here


      // Nothing to do, then
      return forwardConfig;
    }

    // Make sure that this config is of the right class
    ForwardConfig baseConfig = moduleConfig.findForwardConfig(ancestor);

    if (baseConfig == null) {
      throw new UnavailableException("Unable to find " + "forward '" + ancestor + "' to extend.");
    }

    // Was our forwards's class overridden already?
    if (forwardConfig.getClass().equals(ActionForward.class)) {
      // Ensure that our forward is using the correct class
      if (!baseConfig.getClass().equals(forwardConfig.getClass())) {
        // Replace the config with an instance of the correct class
        ForwardConfig newForwardConfig = null;
        String baseConfigClassName = baseConfig.getClass().getName();

        try {
          newForwardConfig = (ForwardConfig) RequestUtils.applicationInstance(baseConfigClassName);
View Full Code Here

      // Verify that required fields are all present for the forward
      // configs
      ForwardConfig[] forwards = actionConfig.findForwardConfigs();

      for (int j = 0; j < forwards.length; j++) {
        ForwardConfig forward = forwards[j];

        if (forward.getPath() == null) {
          handleValueRequiredException("path", forward.getName(), "action forward");
        }
      }

      // ... and the exception configs
      ExceptionConfig[] exceptions = actionConfig.findExceptionConfigs();
View Full Code Here

    // Acquire configuration objects that we need
    ActionConfig actionConfig = actionCtx.getActionConfig();
    ModuleConfig moduleConfig = actionConfig.getModuleConfig();

    ForwardConfig forwardConfig = null;
    String forward = actionConfig.getForward();

    if (forward != null) {
      forwardConfig = forward(actionCtx, moduleConfig, forward);
View Full Code Here

   * @param context
   *            Our ActionContext
   * @return Command to execute or null
   */
  protected Command getCommand(ActionContext context) {
    ForwardConfig forwardConfig = context.getForwardConfig();

    if (forwardConfig == null) {
      return null;
    }

    return getCommand(forwardConfig.getCommand(), forwardConfig.getCatalog());
  }
View Full Code Here

    if (exceptionConfig == null) {
      LOG.warn("Unhandled exception", exception);
      throw exception;
    }

    ForwardConfig forwardConfig = handle(actionCtx, exception, exceptionConfig, actionConfig, moduleConfig);

    if (forwardConfig != null) {
      actionCtx.setForwardConfig(forwardConfig);

      return (false);
View Full Code Here

   * @param forwardName
   *            Logical name of the forwarding instance to be returned
   * @return The local or global forward with the specified name.
   */
  public ActionForward findForward(String forwardName) {
    ForwardConfig config = findForwardConfig(forwardName);

    if (config == null) {
      config = getModuleConfig().findForwardConfig(forwardName);
    }

View Full Code Here

   * @throws Exception
   *             if thrown by the <code>Action</code>
   */
  public boolean execute(ActionContext actionCtx) throws Exception {
    // Is there a ForwardConfig to be performed?
    ForwardConfig forwardConfig = actionCtx.getForwardConfig();

    if (forwardConfig == null) {
      return (false);
    }

View Full Code Here

    }

    request.setAttribute(Globals.ERROR_KEY, errors);

    if (moduleConfig.getControllerConfig().getInputForward()) {
      ForwardConfig forward = mapping.findForward(input);

      processForwardConfig(request, response, forward);
    } else {
      internalModuleRelativeForward(input, request, response);
    }
View Full Code Here

    ActionConfig actionConfig = actionCtx.getActionConfig();
    ActionForm actionForm = actionCtx.getActionForm();

    // Execute the Action for this request, caching returned ActionForward
    ForwardConfig forwardConfig = execute(actionCtx, action, actionConfig, actionForm);

    actionCtx.setForwardConfig(forwardConfig);

    return (false);
  }
View Full Code Here

TOP

Related Classes of org.g4studio.core.mvc.xstruts.config.ForwardConfig

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.