Package org.springframework.web.portlet.bind

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


    @Override
    protected void doBind(NativeWebRequest webRequest, WebDataBinder binder, boolean failOnErrors)
        throws Exception {

      PortletRequestDataBinder servletBinder = (PortletRequestDataBinder) binder;
      servletBinder.bind((PortletRequest) webRequest.getNativeRequest());
      if (failOnErrors) {
        servletBinder.closeNoCatch();
      }
    }
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

   * @return the PortletRequestDataBinder instance to use
   * @throws Exception in case of invalid state or arguments
   * @see PortletRequestDataBinder#bind(javax.portlet.PortletRequest)
   */
  protected PortletRequestDataBinder createBinder(PortletRequest request, Object target, String objectName) throws Exception {
    return new PortletRequestDataBinder(target, objectName);
  }
View Full Code Here

          webRequest.getNativeRequest(PortletRequest.class), target, objectName);
    }

    @Override
    protected void doBind(WebDataBinder binder, NativeWebRequest webRequest) throws Exception {
      PortletRequestDataBinder portletBinder = (PortletRequestDataBinder) binder;
      portletBinder.bind(webRequest.getNativeRequest(PortletRequest.class));
    }
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

   * @see PortletRequestDataBinder#convertIfNecessary(Object, Class, MethodParameter)
   */
  protected PortletRequestDataBinder createBinder(
      PortletRequest request, Object target, String objectName) throws Exception {

    return new PortletRequestDataBinder(target, objectName);
  }
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.