java - List all available model attributes in Thymeleaf -
for debugging purposes list all model attributes available thymeleaf template while rendering.
something like:
<table> <tr th:each="model : ${*}"> <td th:text="${model}"></td> </tr> </table>
but that's nonsense, , well-deserved error. (org.springframework.expression.spel.spelparseexception: el1070e:(pos 0): problem parsing left operand
)
is there way of outputting such debug information? i'd settle logging output.
or, thymeleaf provide similar struts 2's struts.devmode
added debug section @ bottom of page listing available properties?
try this:
<table> <tr th:each="var : ${#vars}"> <td th:text="${var.key}"></td> <td th:text="${var.value}"></td> </tr> </table>
Comments
Post a Comment