I have a thymeleaf form and I would like to return a NULL value to my underlying controller instead of a blank String. Is there a way to do this directly in thymeleaf or do we have to set that conversion logic in the controller?
<div class="form-group">
<label for="note" class="formFieldTitle">Note</label>
<textarea class="form-control" rows="4" id="note" placeholder="Note" th:field="*{note}"
th:classappend="${validated == true ? (#fields.hasErrors('note') ? 'is-invalid' : 'is-valid') : ''}"
th:attr="readonly=${#authorization.expression('!hasAuthority(''Edit Patients'')')}">
</textarea>
<label class="errorMessage" th:if="${#fields.hasErrors('note')}" th:errors="*{note}">Note Error</label>
</div>