Code example for CustomNumberEditor

0
	 *      org.springframework.web.bind.ServletRequestDataBinder) 
	 */ 
	protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { 
		super.initBinder(request, binder); 
		//NumberFormat nf = NumberFormat.getInstance(new Locale("en_US")); 
		binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); 
		binder.registerCustomEditor(Location.class, new LocationEditor()); 
		binder.registerCustomEditor(LocationTag.class, new LocationTagEditor()); 
	} 
	 
	/** 
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#referenceData(javax.servlet.http.HttpServletRequest) 
	 */ 
	@Override 
	protected Map<String, Object> referenceData(HttpServletRequest request) throws Exception { 
		Map<String, Object> ret = new HashMap<String, Object>(); 
		List<LocationTag> tags = Context.getLocationService().getAllLocationTags(); 
		Collections.sort(tags, new MetadataComparator(Context.getLocale())); 
		ret.put("locationTags", tags); 
		ret.put("attributeTypes", Context.getLocationService().getAllLocationAttributeTypes());