<option value="value1,value2"> in Thymleaf

332 views Asked by At

I want to do something like

<option value="value1,value2"> 

in thymleaf. I know for one value all i have to do is

<option th:value="${value1}">

How to pass two values in select option in Thyemleaf.

1

There are 1 answers

0
Praveen Kumar Purushothaman On BEST ANSWER

Use the templating correctly:

<option th:value="${value1} +' '+ ${value2}">