Code example for CustomNumberEditor

    protected void initBinder(HttpServletRequest request, 
                              ServletRequestDataBinder binder) { 
        binder.registerCustomEditor(Integer.class, null, 
                                    new CustomNumberEditor(Integer.class, null, true)); 
        binder.registerCustomEditor(Long.class, null, 
                                    new CustomNumberEditor(Long.class, null, true)); 
                                    new ByteArrayMultipartFileEditor()); 
        SimpleDateFormat dateFormat =  
            new SimpleDateFormat(getText("date.format", request.getLocale())); 
        binder.registerCustomEditor(Date.class, null,  
                                    new CustomDateEditor(dateFormat, true)); 
     * Convenience message to send messages to users, includes app URL as footer. 
     * @param user the user to send a message to. 
     * @param msg the message to send. 
     * @param url the URL of the application.