From fc3fffece6905e1baf2482c844533c7fb4c0a885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Tue, 19 Nov 2019 19:48:18 +0100 Subject: Add contact list submission front-end --- .../pl/edu/mimuw/cloudatlas/client/ClientController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/client') diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java index 01a0b94..c092d4f 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/client/ClientController.java @@ -36,4 +36,16 @@ public class ClientController { model.addAttribute("homeMessage", "Query submitted successfully"); return "home"; } + + @GetMapping("/contacts") + public String contactPage(Model model) { + return "contactsForm"; + } + + @PostMapping("/contacts") + public String contactPage(@ModelAttribute String contactsObject, Model model) { + System.out.println(contactsObject); + model.addAttribute("homeMessage", "Contact list submitted successfully"); + return "home"; + } } -- cgit v1.2.3