Code example for CustomNumberEditor

0
	private ProductValidator productValidator;
	 
	@InitBinder 
	public void initBinder(WebDataBinder binder) {
		binder.registerCustomEditor(BigDecimal.class, 
				new CustomNumberEditor(BigDecimal.class, true));
	} 
	 
	@RequestMapping("/inicio.htm") 
	public void inicio() { 
		 
	} 
 
	@RequestMapping("/productList.htm") 
	public void productList(Model model,
			@ModelAttribute("product") Product product) {
 
		List<Product> products = productManager.getProductsList(product);
		model.addAttribute("products", products);
		model.addAttribute("product", product);