Code example for CustomNumberEditor

0
	 */ 
	@Override 
	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(java.lang.Long.class, new CustomNumberEditor(java.lang.Long.class, true)); 
		binder.registerCustomEditor(java.util.Date.class, new CustomDateEditor(DEFAULT_DATE_FORMAT, 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 { 
		 
		TaskDefinition task = (TaskDefinition) command;