common and generic html thyemleaf datatable page spring-boot java -


i have more 300 controllers. do? have 1 , 1 html page controllers.

i know make loop on list in thyeleaf.

<tbody>     <tr th:each="client : ${customerlist}">         <td th:text="${client.getclientid()}"></td>         <td th:text="${client.getipaddress()}"></td>         <td th:text="${client.getdescription()}"></td>     </tr> </tbody> 

but how iterate on list without specifying properties clientid or ipaddress or description? , able generic operation:

<td><a th:href="'/delete/' + ${client.getclientid}">delete</a></td> <td><a th:href="'/edit/'   + ${client.getclientid}">edit</a></td> 

hope clear

please see picture.

you dont have specify getclientid(), getipaddress() @ looping through list.

<tr th:each="client : ${customerlist}">     <td>repeat me</td> </tr> 

if use above loop <td>repeat me</td> many times size of list customerlist.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -