samedi 4 avril 2015

In spring mvc I am taking the dynamic hobbies values from the database. I have to select any one the hobby.


I can take the value and rendering in HTML



Map<String, List<?>> map = new HashMap<String, List<?>>();
map.put("hobbiesList", hobbiesList);
return new ModelAndView("register", "map", map);
in html
<form:radiobuttons path="hobby"
items="${map.hobbiesList}" />


If I do that , it is showing the list, but my requirement is when loading these hobbies, the default value has to be in selected mode.


Aucun commentaire:

Enregistrer un commentaire