Full error is:
Error during execution of processor 'org.thymeleaf.spring4.processor.attr.SpringInputGeneralFieldAttrProcessor' (search:12)
My search.html page displays when I have:
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<!--<meta charset="UTF-8">-->
<title>Search Users</title>
</head>
<body>
<h3>Search Users</h3>
<form th:action="@{/user/search}" th:object="${searchCriteria}" method="post">
<p>First Name: <input type="text" value="*{firstname}"/></p>
<p>Last Name: <input type="text" value="${searchCritera.lastname}"/></p>
<br/>
<input type="submit" value="search"/>
</form>
</body>
</html>
But I then changed value to th:field for *{firstname} and ${searchCritera.lastname} as below:
<form th:action="@{/user/search}" th:object="${searchCriteria}" method="post">
<p>First Name: <input type="text" th:field="*{firstname}"/></p>
<p>Last Name: <input type="text" th:field="${searchCritera.lastname}"/></p>
<br/>
<input type="submit" value="Search"/>
</form>
Now I get the error above and can't seem to fix it. I tried th:value but it throws another error:
Exception evaluating SpringEL expression: "searchCritera.lastname" (search:12)