I need to call a javascript function on thymeleaf template, something like this:
Case 1:
<select th:onclick="${'function1('a')'}">
But in this case the thymeleaf not work.. some researchs ago (including stackoverflow) I get the followings "solutions":
Case 2:
<select th:onclick="${'function1(''a'')'}">
Case 3:
<select th:onclick="${'function1(\'a\')'}">
Case 4:
<select th:onclick="${'function1(\''+'a'+'\')'}">
But in all cases I get the same error: "...Exception evaluating SpringEL expression..."
My problem is about javascript callings, I need put some parameters ${var} for call in js function. How I can fix that ?
Thanks