Code example for CustomNumberEditor

0
	protected final Log log = LogFactory.getLog(getClass()); 
	 
	@Override 
	protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception { 
		super.initBinder(request, binder); 
		binder.registerCustomEditor(java.lang.Integer.class, new CustomNumberEditor(java.lang.Integer.class, true)); 
	} 
	 
	@Override 
	protected ModelAndView processFormSubmission(HttpServletRequest request, HttpServletResponse reponse, Object obj, 
	        BindException errors) throws Exception { 
		 
		Field field = (Field) obj; 
		 
		field = setObjects(field, request); 
		 
		return super.processFormSubmission(request, reponse, field, errors); 
	} 
	 
	/** 
Contextual code suggestions in your IDE  Get Codota for Java