spring - Thymeleaf URI template JSP equivalent -
in jsp used have table , link record using syntax:
<td><a href="<spring:url value="/person/${person.id}"/>">${person.id}</a></td>
so click link on table move person's details page. achieve same result using thymeleaf, not quite sure how. question is: thymeleaf equivalent?
<td th:text="${trip.hrperson}"></td> <td><a th:href="@{/remove/trip.id}"></a> ${trip.id} </td>
first example displays static value , it's ok, second supposed link fails.
in thymleaf
make link follows
<a th:href="@{'/person/' + $person.id}" th:text="${person.id}">my user id</a>
Comments
Post a Comment