Guest User

Untitled

a guest
May 26th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title></title>
  4. <script src="jquery-1.11.2.js"></script>
  5. <script>
  6. $(function() {
  7. $('#chek').click(function () {
  8. if ($(this).attr('checked')) {
  9. $("#btnSubmit").html("true");
  10. }
  11. else {
  12. $("#btnSubmit").html("false");
  13. }
  14. });
  15. });
  16. </script>
  17. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  18. </head>
  19.  
  20. <body>
  21. <div>
  22. <form method="post">
  23.  
  24. <input type="checkbox" id = "chek" name="readAlread" value="true"> true
  25. <input type="checkbox" name="readAlread" value="false"> false
  26. <br>
  27. <br>
  28. <input id ="btnSubmit" type="submit" value="submit" onclick="chek">Добавить
  29. </form>
  30. </div>
  31. </body>
  32. </html>
  33.  
  34. @PostMapping("/add")
  35. public String add(@RequestParam Boolean readAlready, Map<String, Object> model) {
  36. ......
  37. return "main";
  38. }
  39.  
  40. Whitelabel Error Page
  41. This application has no explicit mapping for /error, so you are seeing this as a fallback.
  42.  
  43. Sat May 26 20:09:56 MSK 2018
  44. There was an unexpected error (type=Bad Request, status=400).
  45. Required Boolean parameter 'readAlready' is not present
Add Comment
Please, Sign In to add comment