Code example for CustomNumberEditor

0
     * 
     * @see MultiActionController#createBinder(HttpServletRequest,Object) 
     */ 
    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) { 
    	binder.registerCustomEditor(Short.class, new CustomNumberEditor(Short.class, true)); 
        binder.registerCustomEditor(Integer.class, new CustomNumberEditor(Integer.class, true)); 
        binder.registerCustomEditor(Long.class, new CustomNumberEditor(Long.class, true)); 
        binder.registerCustomEditor(Float.class, new CustomNumberEditor(Float.class, true)); 
        binder.registerCustomEditor(Double.class, new CustomNumberEditor(Double.class, true)); 
        binder.registerCustomEditor(BigDecimal.class, new CustomNumberEditor(BigDecimal.class, true)); 
        binder.registerCustomEditor(BigInteger.class, new CustomNumberEditor(BigInteger.class, true)); 
         
        binder.registerCustomEditor(java.util.Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); 
         
    } 
	 
	public static ModelMap toModelMap(Page page,PageRequest pageRequest) { 
		return toModelMap("",page, pageRequest); 
	}