Search in sources :

Example 1 with GrupoForm

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

the class GruposController method newGrupo.

@RequestMapping("/new")
public String newGrupo(Model model, WebRequest request) {
    GrupoForm usuarioForm = new GrupoForm();
    model.addAttribute(usuarioForm);
    return "grupos/form";
}
Also used : GrupoForm(com.tomasio.projects.trainning.form.GrupoForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with GrupoForm

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

the class GruposController method editGrupo.

@RequestMapping("/edit")
public String editGrupo(Model model, WebRequest request) {
    String grupoId = request.getParameter("grupoId");
    NetworkGroupDTO dto = userService.findRoleGroup(grupoId);
    GrupoForm grupoForm = new GrupoForm();
    grupoForm.setNome(dto.getNome());
    grupoForm.setDescricao(dto.getDescricao());
    grupoForm.setId(dto.getId());
    model.addAttribute(grupoForm);
    return "grupos/form";
}
Also used : NetworkGroupDTO(com.tomasio.projects.trainning.dto.NetworkGroupDTO) GrupoForm(com.tomasio.projects.trainning.form.GrupoForm) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

GrupoForm (com.tomasio.projects.trainning.form.GrupoForm)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 NetworkGroupDTO (com.tomasio.projects.trainning.dto.NetworkGroupDTO)1