Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. <form name='form' th:object="${role}" method='GET'>
  2. <table>
  3. <tr>
  4. <td>Rol sec</td>
  5. <td>
  6. <select class="form-control"
  7. th:field="${roleList}" >
  8.  
  9.  
  10. <option value="0">
  11. Rol seciniz
  12. </option>
  13. <option th:each="role : ${roleList}"
  14. th:value="${role.id}"
  15. th:text="${role.name}">
  16.  
  17. </option>
  18. </select>
  19.  
  20. </td>
  21. </tr>
  22.  
  23. <tr>
  24. <td><input name="submit" type="submit" value="Sec" /></td>
  25. </tr>
  26. </table>
  27. </form>
  28.  
  29. @GetMapping(value = {"/assign-roles"})
  30. ...
  31. modelView.addObject("roleList", roleService.findAll());
  32.  
  33. return modelView;
  34. }
  35.  
  36. th:action="${'/menu/id'}"
  37.  
  38. @GetMapping("/{id}")
  39. public ModelAndView getMenusForRole(@PathVariable String id) {
  40.  
  41.  
  42. //same modelview
  43.  
  44. modelView.addObject("menuList", menuService.findAllMenusForRole(id));
  45.  
  46. return modelView;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement