Code example for CustomNumberEditor

0
	 * @see org.springframework.web.servlet.mvc.BaseCommandController#initBinder(javax.servlet.http.HttpServletRequest, 
	 *      org.springframework.web.bind.ServletRequestDataBinder) 
	 */ 
	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)); 
	} 
	 
	/** 
	 * This is called prior to displaying a form for the first time. It tells Spring the 
	 * form/command object to load into the request 
	 *  
	 * @see org.springframework.web.servlet.mvc.AbstractFormController#formBackingObject(javax.servlet.http.HttpServletRequest) 
	 */ 
	protected Object formBackingObject(HttpServletRequest request) throws ServletException { 
		 
		//default empty Object 
		List<EncounterType> encounterTypeList = new Vector<EncounterType>(); 
		 
		//only fill the Object is the user has authenticated properly