i am using spring boot in my project, and i am generating checkboxes using following approach.everything works fine but how can i check certain checkboxes.
<form:checkboxes items="${availabilities}" `path="availabilities" itemValue="idavailability" itemLabel="availabletype"` />
this is the controller method
public String approveContent( Model model){
model.addAttribute("availabilities",availabilityRep.findAll());
return "approve";
}
this is the model
public class Availability implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int idavailability;
private String availabletype;
}
Aucun commentaire:
Enregistrer un commentaire