Package org.apache.struts.action

Examples of org.apache.struts.action.ActionForm


  @Test
  public void testPrePopulate2() throws Exception
  {

    FormPopulateSource delegate = new FormPopulateSourceImpl();
    ActionForm actionForm = new SimpleStrutsForm();
    DelegatingForm delegator = new DelegatingForm(actionForm);

    ControllerRequestProcessor processor = new ControllerRequestProcessor();
    processor.setFormPopulationSource(delegate);
View Full Code Here


  @Test
  public void testPreValidate() throws Exception
  {

    FormValidationHandler delegate = new FormValidationHandlerImpl();
    ActionForm actionForm = new SimpleStrutsForm();
    DelegatingForm delegator = new DelegatingForm(actionForm);

    ControllerRequestProcessor processor = new ControllerRequestProcessor();
    processor.setFormValidationHandler(delegate);
View Full Code Here

  @Override
  protected void populate(ActionContext context, ActionConfig actionConfig, ActionForm actionForm) throws Exception
  {
    final ServletActionContext sc = (ServletActionContext) context;
    final ActionForm form = sc.getActionForm();
    final HttpServletRequest request = sc.getRequest();
    ActionForm wrappedForm = formPopulateSource.prePopulate(form, request);

        populateForm(actionConfig, request, wrappedForm);
  }
View Full Code Here

  @Override
  public boolean execute(ActionContext actionContext) throws Exception
  {
   
    ActionForm form = actionContext.getActionForm();

    if (form != null)
    {

      ServletActionContext sc = (ServletActionContext) actionContext;
View Full Code Here

   * Creates hooks for extending <code>processActionForm()</code>
   */
  protected ActionForm processActionForm(HttpServletRequest request, HttpServletResponse response,
      ActionMapping mapping)
  {
    ActionForm form = super.processActionForm(request, response, mapping);
    return postProcessActionForm(request, response, form);
  }
View Full Code Here

   * Creates hooks for extending <code>processActionForm()</code>
   */
  protected ActionForm processActionForm(HttpServletRequest request, HttpServletResponse response,
      ActionMapping mapping)
  {
    ActionForm form = super.processActionForm(request, response, mapping);
    return postProcessActionForm(request, response, form);
  }
View Full Code Here

  @Override
  protected ViewAdapter executeAction(Object actionBean, ActionContext context)
  {
 
    BasicSubmitAction action = (BasicSubmitAction) actionBean;
    ActionForm form = context.getForm();
 
    HttpServletRequest request = context.getRequest();
 
    boolean cancelled = false;
    if (request.getAttribute(Globals.CANCEL_KEY) != null)
View Full Code Here

  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)
View Full Code Here

  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)
View Full Code Here

  protected ViewAdapter executeAction(Object actionBean, ActionContext context)
  {

    NavigableFormAction action = (NavigableFormAction) actionBean;

    ActionForm form = context.getForm();

    boolean hasErrors = hasErrors(context);
    action.setInputError(hasErrors);

    if (form instanceof BindingForm && !hasErrors)
View Full Code Here

TOP

Related Classes of org.apache.struts.action.ActionForm

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.