Search in sources :

Example 1 with AnexoApostilaForm

use of com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm in project trainning by fernandotomasio.

the class ApostilasController method newAnexo.

@RequestMapping("/anexo/new")
public String newAnexo(Model model, WebRequest request) {
    String apostilaIdParam = request.getParameter("apostilaId");
    Long apostilaId = Long.parseLong(apostilaIdParam);
    AnexoApostilaForm anexo = new AnexoApostilaForm();
    anexo.setApostilaId(apostilaId);
    model.addAttribute(anexo);
    return "anexos/form";
}
Also used : AnexoApostilaForm(com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with AnexoApostilaForm

use of com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm in project trainning by fernandotomasio.

the class ApostilasController method editAnexo.

@RequestMapping("/anexo/edit")
public String editAnexo(Model model, WebRequest request) {
    String anexoIdParam = request.getParameter("anexoId");
    Long anexoId = Long.parseLong(anexoIdParam);
    AnexoApostilaDTO dto = teachingDocumentsService.findAnexoApostila(anexoId);
    AnexoApostilaForm form = new AnexoApostilaForm();
    form.setApostilaId(dto.getId());
    form.setApostilaId(dto.getApostila().getId());
    form.setContent(dto.getContent());
    model.addAttribute(form);
    return "anexos/form";
}
Also used : AnexoApostilaDTO(com.tomasio.projects.trainning.dto.AnexoApostilaDTO) AnexoApostilaForm(com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

AnexoApostilaForm (com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 AnexoApostilaDTO (com.tomasio.projects.trainning.dto.AnexoApostilaDTO)1