Package org.strecks.action

Examples of org.strecks.action.NavigableSubmitAction


  @Override
  protected ViewAdapter executeAction(Object actionBean, ActionContext context)
  {

    NavigableSubmitAction action = (NavigableSubmitAction) actionBean;

    ActionForm form = context.getForm();

    HttpServletRequest request = context.getRequest();

    boolean cancelled = false;
    if (request.getAttribute(Globals.CANCEL_KEY) != null)
    {
      cancelled = true;
    }

    if (form instanceof BindingForm && !cancelled)
    {

      action.preBind();
      BindingForm validBindingForm = (BindingForm) form;
      validBindingForm.bindInwards(actionBean);

    }

    ActionMapping mapping = context.getMapping();

    if (cancelled)
    {
      action.cancel();
    }
    else
    {

      // now figure out what method to execute and do so

      String parameterName = mapping.getParameter();

      getHelper().checkParameterName(mapping, parameterName);

      String methodName = getMethodName(context, parameterName);

      if (methodName == null)
      {
        action.execute();
      }
      else
      {
        Method method = getHelper().getMethod(actionBean, methodName);
        ReflectHelper.invokeMethod(actionBean, method, String.class);
View Full Code Here


  @Override
  protected ViewAdapter executeAction(Object actionBean, ActionContext context)
  {

    NavigableSubmitAction action = (NavigableSubmitAction) actionBean;

    ActionForm form = context.getForm();

    HttpServletRequest request = context.getRequest();

    boolean cancelled = false;
    if (request.getAttribute(Globals.CANCEL_KEY) != null)
    {
      cancelled = true;
    }
   
    //FIXME call deferred form validation here     
   
    //FIXME call validation methods here

    if (form instanceof BindingForm && !cancelled)
    {
      action.preBind();
      BindingForm validBindingForm = (BindingForm) form;
      validBindingForm.bindInwards(actionBean);
    }

    if (cancelled)
      action.cancel();
    else
      action.execute();

    return findActionForward(actionBean, context);

  }
View Full Code Here

TOP

Related Classes of org.strecks.action.NavigableSubmitAction

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.