1
Hello. I am studying the spring mvc and I am a few questions about its functioning. One of them is on the part of the controller.
When I fill out a form and request a controller method, are all the parameters I receive within that method in the request? In this example below the task and result parameters are inside the request and when the method is finished they will be passed to the view (and if there is an error in the task validation errors will be saved in result and returned to the form)?
@RequestMapping("adicionaTarefa")
public String adiciona(@Valid Tarefa tarefa, BindingResult result) {
if(result.hasFieldErrors("descricao")) {
return "tarefa/formulario";
}
dao.adiciona(tarefa);
return "tarefa/adicionada";
}
Thank you!
Thank you for clarifying my doubts, nullptr. Your explanation was very good.
– Gustavo Cruz