Package org.springframework.web.portlet.bind

Examples of org.springframework.web.portlet.bind.PortletRequestDataBinder


          logger.debug("Processing valid submit (redirectAction = " + isRedirectAction() + ")");
        }
        if (!isRedirectAction()) {
          setFormSubmit(response);
        }
        PortletRequestDataBinder binder = bindAndValidate(request, command);
        BindException errors = new BindException(binder.getBindingResult());
        processFormSubmission(request, response, command, errors);
        setRenderCommandAndErrors(request, command, errors);
        return;
      }
      catch (PortletSessionRequiredException ex) {
View Full Code Here


      throw new PortletException("Form object returned by formBackingObject() must match commandClass");
    }

    // Bind without validation, to allow for prepopulating a form, and for
    // convenient error evaluation in views (on both first attempt and resubmit).
    PortletRequestDataBinder binder = createBinder(request, command);
    BindException errors = new BindException(binder.getBindingResult());

    if (isBindOnNewForm()) {
      if (logger.isDebugEnabled()) {
        logger.debug("Binding to new form");
      }
      binder.bind(request);
      onBindOnNewForm(request, command, errors);
    }
   
    // Return BindException object that resulted from binding.
    return errors;
View Full Code Here

      throw new PortletException("Form object returned by formBackingObject() must not be null");
    }
    if (!checkCommand(command)) {
      throw new PortletException("Form object returned by formBackingObject() must match commandClass");
    }
    PortletRequestDataBinder binder = bindAndValidate(request, command);
    BindException errors = new BindException(binder.getBindingResult());
    processFormSubmission(request, response, command, errors);
    setRenderCommandAndErrors(request, command, errors);
  }
View Full Code Here

   * @throws Exception in case of invalid state or arguments
   */
  protected final PortletRequestDataBinder bindAndValidate(PortletRequest request, Object command)
      throws Exception {
       
    PortletRequestDataBinder binder = createBinder(request, command);
    if (!suppressBinding(request)) {
      binder.bind(request);
      BindException errors = new BindException(binder.getBindingResult());
      onBind(request, command, errors);
      if (this.validators != null && isValidateOnBinding() && !suppressValidation(request)) {
        for (int i = 0; i < this.validators.length; i++) {
          ValidationUtils.invokeValidator(this.validators[i], command, errors);
        }
View Full Code Here

   * @see #initBinder
   */
  protected PortletRequestDataBinder createBinder(PortletRequest request, Object command)
      throws Exception {
     
    PortletRequestDataBinder binder = new PortletRequestDataBinder(command, getCommandName());
    prepareBinder(binder);
    initBinder(request, binder);
    return binder;
  }
View Full Code Here

    // Create the command object.
    Object command = getCommand(request);

    // Compute the errors object.
    PortletRequestDataBinder binder = bindAndValidate(request, command);
    BindException errors = new BindException(binder.getBindingResult());

    // Actually handle the action.
    handleAction(request, response, command, errors);

    // Pass the command and errors forward to the render phase.
View Full Code Here

      errors = getRenderErrors(request);
    }
    else {
      logger.debug("Render phase creating new command and errors objects");
      command = getCommand(request);
      PortletRequestDataBinder binder = bindAndValidate(request, command);
      errors = new BindException(binder.getBindingResult());
    }

    return handleRender(request, response, command, errors);
  }
View Full Code Here

          logger.debug("Processing valid submit (redirectAction = " + isRedirectAction() + ")");
        }
        if (!isRedirectAction()) {
          setFormSubmit(response);
        }
        PortletRequestDataBinder binder = bindAndValidate(request, command);
        BindException errors = new BindException(binder.getBindingResult());
        processFormSubmission(request, response, command, errors);
        setRenderCommandAndErrors(request, command, errors);
        return;
      }
      catch (PortletSessionRequiredException ex) {
View Full Code Here

      throw new PortletException("Form object returned by formBackingObject() must match commandClass");
    }

    // Bind without validation, to allow for prepopulating a form, and for
    // convenient error evaluation in views (on both first attempt and resubmit).
    PortletRequestDataBinder binder = createBinder(request, command);
    BindException errors = new BindException(binder.getBindingResult());

    if (isBindOnNewForm()) {
      if (logger.isDebugEnabled()) {
        logger.debug("Binding to new form");
      }
      binder.bind(request);
      onBindOnNewForm(request, command, errors);
    }
   
    // Return BindException object that resulted from binding.
    return errors;
View Full Code Here

      throw new PortletException("Form object returned by formBackingObject() must not be null");
    }
    if (!checkCommand(command)) {
      throw new PortletException("Form object returned by formBackingObject() must match commandClass");
    }
    PortletRequestDataBinder binder = bindAndValidate(request, command);
    BindException errors = new BindException(binder.getBindingResult());
    processFormSubmission(request, response, command, errors);
    setRenderCommandAndErrors(request, command, errors);
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.portlet.bind.PortletRequestDataBinder

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.