Search in sources :

Example 1 with ApostilaForm

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

the class ApostilasController method editApostila.

@RequestMapping("/edit")
public String editApostila(Model model, WebRequest request) {
    String cursoId = request.getParameter("apostilaId");
    ApostilaDTO dto = teachingDocumentsService.findApostila(Long.parseLong(cursoId));
    ApostilaForm apostilaForm = new ApostilaForm();
    apostilaForm.setDisciplinaId(dto.getDisciplina().getId());
    apostilaForm.setDefinicoes(dto.getDefinicoes());
    apostilaForm.setIntroducao(dto.getIntroducao());
    model.addAttribute(apostilaForm);
    return "apostilas/form";
}
Also used : AnexoApostilaDTO(com.tomasio.projects.trainning.dto.AnexoApostilaDTO) ApostilaDTO(com.tomasio.projects.trainning.dto.ApostilaDTO) CapituloApostilaDTO(com.tomasio.projects.trainning.dto.CapituloApostilaDTO) SecaoApostilaDTO(com.tomasio.projects.trainning.dto.SecaoApostilaDTO) AnexoApostilaForm(com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm) ApostilaForm(com.tomasio.projects.trainning.form.apostila.ApostilaForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with ApostilaForm

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

the class ApostilasController method newApostila.

@RequestMapping("/new")
public String newApostila(Model model, WebRequest request) {
    String curriculoMinimoIdParam = request.getParameter("curriculoMinimoId");
    Long curriculoMinimoId = Long.parseLong(curriculoMinimoIdParam);
    ApostilaForm apostilaForm = new ApostilaForm();
    model.addAttribute(apostilaForm);
    model.addAttribute("selectableDisciplinas", initializeSelectableDisciplinas(curriculoMinimoId));
    return "apostilas/form";
}
Also used : AnexoApostilaForm(com.tomasio.projects.trainning.form.apostila.AnexoApostilaForm) ApostilaForm(com.tomasio.projects.trainning.form.apostila.ApostilaForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

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