Hello
how to clear search fields in form after search is done.
The corresponding search method in controller is. The result is displayed but also search fields aren't empty.
Code:@RequestMapping("searchaction.html") public ModelAndView searchAction( @ModelAttribute("account") Account account) { List<Account> result = accountDao.findByExample(account); Map<String, Object> modelMap = new TreeMap<String, Object>(); modelMap.put("result", result ); //this does not help modelMap.put("result", new Account ()); return new ModelAndView("account_list", modelMap); }



Reply With Quote