Skip to content
Snippets Groups Projects
Commit 041d798e authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#699 - append to existing notifications

parent 55840499
No related branches found
No related tags found
No related merge requests found
...@@ -175,7 +175,9 @@ public class AccountController extends BaseController ...@@ -175,7 +175,9 @@ public class AccountController extends BaseController
// executed BEFORE this controller method and therefore the notifications list is empty in the // executed BEFORE this controller method and therefore the notifications list is empty in the
// resulting page. // resulting page.
// Quickfix: explicitly set the model attribute "notifications" // Quickfix: explicitly set the model attribute "notifications"
model.addAttribute(ModelAttributes.NOTIFICATIONS, List.of(notification)); final List<Notification> notifications = WebRequestUtils.getNotifications(webRequest);
notifications.add(notification);
model.addAttribute(ModelAttributes.NOTIFICATIONS, notifications);
bindingResult.addError(new FieldError("NewAccount", "state", account.getAccountState(), false, new String[]{"warning.account.edit.state"}, null, null)); bindingResult.addError(new FieldError("NewAccount", "state", account.getAccountState(), false, new String[]{"warning.account.edit.state"}, null, null));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment