use of com.tomasio.projects.trainning.form.AreaForm in project trainning by fernandotomasio.
the class AreasController method editArea.
@RequestMapping("/edit")
public String editArea(Model model, WebRequest request) {
String areaId = request.getParameter("areaId");
AreaDTO[] areas = trainningService.findAllAreasExcept(Long.parseLong(areaId));
AreaDTO dto = trainningService.findArea(Long.parseLong(areaId));
AreaForm areaForm = new AreaForm();
areaForm.setId(dto.getId());
areaForm.setSigla(dto.getSigla());
areaForm.setNome(dto.getNome());
areaForm.setParentId(dto.getParentId());
model.addAttribute("areas", areas);
model.addAttribute(areaForm);
return "areas/form";
}
use of com.tomasio.projects.trainning.form.AreaForm in project trainning by fernandotomasio.
the class AreasController method newArea.
@RequestMapping("/new")
public String newArea(Model model) {
AreaDTO[] areas = trainningService.findAllAreas();
AreaForm areaForm = new AreaForm();
model.addAttribute(areaForm);
model.addAttribute("areas", areas);
return "areas/form";
}
Aggregations