Search in sources :

Example 1 with ConsultaForm

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

the class ConsultasInstrutoresController method newConsulta.

@RequestMapping("/new_consulta")
public String newConsulta(Model model, WebRequest request) {
    String turmaIdParam = request.getParameter("turmaId");
    if (turmaIdParam != null) {
        Long turmaId = Long.parseLong(turmaIdParam);
        TurmaDTO turma = atividadesEnsinoService.findTurmaEfetiva(turmaId);
        model.addAttribute("turma", turma);
        model.addAttribute(new ConsultaForm());
        return "consultas_instrutores/form_consulta";
    } else {
        return "redirect:select_turma";
    }
}
Also used : ConsultaForm(com.tomasio.projects.trainning.form.ConsultaForm) ItemConsultaForm(com.tomasio.projects.trainning.form.ItemConsultaForm) TurmaDTO(com.tomasio.projects.trainning.dto.TurmaDTO) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

TurmaDTO (com.tomasio.projects.trainning.dto.TurmaDTO)1 ConsultaForm (com.tomasio.projects.trainning.form.ConsultaForm)1 ItemConsultaForm (com.tomasio.projects.trainning.form.ItemConsultaForm)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1