Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form name='form' th:object="${role}" method='GET'>
- <table>
- <tr>
- <td>Rol sec</td>
- <td>
- <select class="form-control"
- th:field="${roleList}" >
- <option value="0">
- Rol seciniz
- </option>
- <option th:each="role : ${roleList}"
- th:value="${role.id}"
- th:text="${role.name}">
- </option>
- </select>
- </td>
- </tr>
- <tr>
- <td><input name="submit" type="submit" value="Sec" /></td>
- </tr>
- </table>
- </form>
- @GetMapping(value = {"/assign-roles"})
- ...
- modelView.addObject("roleList", roleService.findAll());
- return modelView;
- }
- th:action="${'/menu/id'}"
- @GetMapping("/{id}")
- public ModelAndView getMenusForRole(@PathVariable String id) {
- //same modelview
- modelView.addObject("menuList", menuService.findAllMenusForRole(id));
- return modelView;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement