use of com.tomasio.projects.trainning.form.PlanoForm in project trainning by fernandotomasio.
the class PlanosController method editPlano.
@RequestMapping("/edit")
public String editPlano(Model model, WebRequest request) {
String planoId = request.getParameter("planoId");
PlanoDTO dto = trainningService.findPlano(Long.parseLong(planoId));
PlanoForm planoForm = new PlanoForm();
planoForm.setId(dto.getId());
planoForm.setSigla(dto.getSigla());
planoForm.setDescricao(dto.getDescricao());
planoForm.setDiasIndicacaoInicio(dto.getDiasIndicacaoInicio());
planoForm.setDiasIndicacaoTermino(dto.getDiasIndicacaoTermino());
planoForm.setOrganizacaoId(dto.getOMResponsavelId());
model.addAttribute("OMs", initializeSelectableOMs());
model.addAttribute("formPlano", planoForm);
return "plano_cadastro/form";
}
use of com.tomasio.projects.trainning.form.PlanoForm in project trainning by fernandotomasio.
the class PlanosController method newPlano.
@RequestMapping("/new")
public String newPlano(Model model, WebRequest request) {
PlanoForm planoForm = new PlanoForm();
model.addAttribute("OMs", initializeSelectableOMs());
model.addAttribute("formPlano", planoForm);
return "plano_cadastro/form";
}
Aggregations