Spring Framework WebDataBinderFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework WebDataBinderFactory class.

This code example shows how to use the following methods:createBinder
This code example shows how to use the following methods:createBinder
	 */ 
	protected Object createAttributeFromRequestValue(String sourceValue, String attributeName, 
			MethodParameter parameter, WebDataBinderFactory binderFactory, NativeWebRequest request) 
			throws Exception { 
 
		DataBinder binder = binderFactory.createBinder(request, null, attributeName); 
		ConversionService conversionService = binder.getConversionService(); 
		if (conversionService != null) { 
			TypeDescriptor source = TypeDescriptor.valueOf(String.class); 
			TypeDescriptor target = new TypeDescriptor(parameter); 
			if (conversionService.canConvert(source, target)) { 
				return binder.convertIfNecessary(sourceValue, parameter.getParameterType(), parameter); 
			} 
		} 
		return null; 
	} 
 
	/** 
	 * This implementation downcasts {@link WebDataBinder} to 
	 * {@link ServletRequestDataBinder} before binding. 
5
CodeRank
See Code Examples for Spring Framework WebDataBinderFactory Methods: