Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table align="center">
- <thead>
- <tr>
- <th th:text="host">host</th>
- <th th:text="status">status</th>
- <th th:text="command">command</th>
- </tr>
- </thead>
- <tbody>
- <tr th:each="hostInstance: ${allHosts}">
- <td th:text="${hostInstance.name}"></td>
- <td th:text="${hostInstance.status}"></td>
- <td>
- <button type="submit" name="start" th:value="${hostInstance.name}" th:text="Start"></button>
- </td>
- </tr>
- </tbody>
- </table>
- @RequestMapping(value="/network", params={"start"})
- public String startApp(final NetworkCluster networkCluster, final BindingResult bindingResult, final HttpServletRequest req, Model model) {
- String result = req.getParameter("start");
- System.out.println(result + " is clicked");
- return "redirect:/network";
- }
- <table align="center">
- <thead>
- <tr>
- <th>host</th>
- <th>status</th>
- <th>command</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>machine_1</td>
- <td>down</td>
- <td>
- <div>
- <p><button type="submit" name="start" value="machine_1">Start</button></p>
- </div>
- </td>
- </tr>
- <tr>
- <td>machine_2</td>
- <td>down</td>
- <td>
- <div>
- <p><button type="submit" name="start" value="machine_2">Start</button></p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement