You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the method DesignTacoController.processDesign when the Taco has any error, the view default is to be shown again.
But there is one error, the view design cannot be rendered, it complaints about missing the user.
Code snippet
@PostMapping
public String processDesign(
@Valid Taco taco, Errors errors,
@ModelAttribute Order order, Model model) {
log.info(" --- Saving taco");
if (errors.hasErrors()) {
return "design";
}
Error An error happened during template parsing (template: "class path resource [templates/design.html]")... Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "user.fullname" (template: "design" - line 11, col 31)
Here the user is not part of the model, and the view design cannot be render.
Anyone has a smart elegant solution for it ? i.e. to tell the backend that needs to pass the user to the view.
ATTENTION, it is only in the redirect when there is an error. If the user logins, then the design view has not issues, this is because the GetMapping method is invoked.
The text was updated successfully, but these errors were encountered:
In the method DesignTacoController.processDesign when the Taco has any error, the view default is to be shown again.
But there is one error, the view design cannot be rendered, it complaints about missing the user.
Code snippet
design.html
Error
An error happened during template parsing (template: "class path resource [templates/design.html]")... Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "user.fullname" (template: "design" - line 11, col 31)
Here the user is not part of the model, and the view design cannot be render.
Anyone has a smart elegant solution for it ? i.e. to tell the backend that needs to pass the user to the view.
ATTENTION, it is only in the redirect when there is an error. If the user logins, then the design view has not issues, this is because the GetMapping method is invoked.
The text was updated successfully, but these errors were encountered: