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)); 
	} 
	 
	/** 
	 * @see org.springframework.web.servlet.mvc.SimpleFormController#processFormSubmission(javax.servlet.http.HttpServletRequest, 
	 *      javax.servlet.http.HttpServletResponse, java.lang.Object, 
	 *      org.springframework.validation.BindException) 
	 */ 
	@Override 
	protected ModelAndView processFormSubmission(HttpServletRequest request, HttpServletResponse response, Object command, 
	        BindException errors) throws Exception { 
		 
		RelationshipType type = (RelationshipType) command; 
		new RelationshipTypeValidator().validate(type, errors);