Package org.springframework.web.bind

Examples of org.springframework.web.bind.ServletRequestDataBinder.bind()


            String handlerName = (String) object;
            object = getApplicationContext().getBean(handlerName);
        }

        ServletRequestDataBinder binder = new ServletRequestDataBinder(object, null);
        binder.bind(request);
        return object;
    }

}
View Full Code Here


    } catch (Exception e) {
      throw new TaskHandlerException(e.getMessage(),e.getCause());
    }
    ServletRequestDataBinder binder = new ServletRequestDataBinder(taskData);
    binder.setConversionService(conversionService.getObject());
    binder.bind(request);
    try {
      binder.closeNoCatch();
    } catch(Exception e) {
      throw new TaskHandlerException(e.getMessage(),e.getCause());
    }
View Full Code Here

        }

        if (object != null) {
            ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
            try {
                binder.bind(request);
                binder.setIgnoreUnknownFields(true);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Bound POJO is now: " + object);
                }
            }
View Full Code Here

          }
         
         
            ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
            try {
                binder.bind(request);
                binder.setIgnoreUnknownFields(true);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Bound POJO is now: " + object);
                }
            }
View Full Code Here

     * useful for POJOs which are configurable via request parameters such as
     * for query/view POJOs
     */
    protected Object bindRequestBean(Object bean, ServletRequest request) {
        ServletRequestDataBinder binder = new ServletRequestDataBinder(bean, null);
        binder.bind(request);
        return bean;
    }

}
View Full Code Here

          }
         
         
            ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
            try {
                binder.bind(request);
                binder.setIgnoreUnknownFields(true);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Bound POJO is now: " + object);
                }
            }
View Full Code Here

            String handlerName = (String) object;
            object = getApplicationContext().getBean(handlerName);
        }

        ServletRequestDataBinder binder = new ServletRequestDataBinder(object, "request");
        binder.bind(request);
        binder.setIgnoreUnknownFields(true);
        if (log.isDebugEnabled()) {
            log.debug("Bound POJO is now: " + object);
        }
        return object;
View Full Code Here

      throws Exception {

    ThrowawayController throwaway = (ThrowawayController) handler;

    ServletRequestDataBinder binder = createBinder(request, throwaway);
    binder.bind(request);
    binder.closeNoCatch();

    return throwaway.execute();
  }
View Full Code Here

      throws Exception {

    ServletRequestDataBinder binder = createBinder(request, command);
    BindException errors = new BindException(binder.getBindingResult());
    if (!suppressBinding(request)) {
      binder.bind(request);
      onBind(request, command, errors);
      if (this.validators != null && isValidateOnBinding() && !suppressValidation(request, command, errors)) {
        for (int i = 0; i < this.validators.length; i++) {
          ValidationUtils.invokeValidator(this.validators[i], command, errors);
        }
View Full Code Here

   * @throws Exception in case of invalid state or arguments
   */
  protected void bind(HttpServletRequest request, Object command) throws Exception {
    logger.debug("Binding request parameters onto MultiActionController command");
    ServletRequestDataBinder binder = createBinder(request, command);
    binder.bind(request);
    if (this.validators != null) {
      for (int i = 0; i < this.validators.length; i++) {
        if (this.validators[i].supports(command.getClass())) {
          ValidationUtils.invokeValidator(this.validators[i], command, binder.getBindingResult());
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.