Package org.springframework.web.bind

Examples of org.springframework.web.bind.WebDataBinder.convertIfNecessary()


            "primitive type. Consider declaring it as object wrapper for the corresponding primitive type.");
      }
    }
    WebDataBinder binder = createBinder(webRequest, null, paramName);
    initBinder(handlerForInitBinderCall, paramName, binder, webRequest);
    return binder.convertIfNecessary(paramValue, paramType, methodParam);
  }

  private WebDataBinder resolveModelAttribute(String attrName, MethodParameter methodParam,
      ExtendedModelMap implicitModel, NativeWebRequest webRequest, Object handler) throws Exception {
View Full Code Here


      }
      paramValue = checkValue(paramName, paramValue, paramType);
    }
    WebDataBinder binder = createBinder(webRequest, null, paramName);
    initBinder(handlerForInitBinderCall, paramName, binder, webRequest);
    return binder.convertIfNecessary(paramValue, paramType, methodParam);
  }

  private Map resolveRequestParamMap(Class<? extends Map> mapType, NativeWebRequest webRequest) {
    Map<String, String[]> parameterMap = webRequest.getParameterMap();
    if (MultiValueMap.class.isAssignableFrom(mapType)) {
View Full Code Here

      }
      headerValue = checkValue(headerName, headerValue, paramType);
    }
    WebDataBinder binder = createBinder(webRequest, null, headerName);
    initBinder(handlerForInitBinderCall, headerName, binder, webRequest);
    return binder.convertIfNecessary(headerValue, paramType, methodParam);
  }

  private Map resolveRequestHeaderMap(Class<? extends Map> mapType, NativeWebRequest webRequest) {
    if (MultiValueMap.class.isAssignableFrom(mapType)) {
      MultiValueMap<String, String> result;
View Full Code Here

      }
      cookieValue = checkValue(cookieName, cookieValue, paramType);
    }
    WebDataBinder binder = createBinder(webRequest, null, cookieName);
    initBinder(handlerForInitBinderCall, cookieName, binder, webRequest);
    return binder.convertIfNecessary(cookieValue, paramType, methodParam);
  }

  /**
   * Resolves the given {@link CookieValue @CookieValue} annotation.
   * <p>Throws an UnsupportedOperationException by default.
View Full Code Here

      pathVarName = getRequiredParameterName(methodParam);
    }
    String pathVarValue = resolvePathVariable(pathVarName, paramType, webRequest);
    WebDataBinder binder = createBinder(webRequest, null, pathVarName);
    initBinder(handlerForInitBinderCall, pathVarName, binder, webRequest);
    return binder.convertIfNecessary(pathVarValue, paramType, methodParam);
  }

  /**
   * Resolves the given {@link PathVariable @PathVariable} annotation.
   * <p>Throws an UnsupportedOperationException by default.
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.