I am using thymeleaf and Spring Boot to parse an entity.
I'm trying to change a boolean
field value to String
like 'yes' or 'No' but as simple as it seems, I am getting the following error:
12:54:30.046 [XNIO-2 task-17] ERROR o.t.templateparser.ErrorHandler - [THYMELEAF][XNIO-2 task-17] Fatal error during parsing org.xml.sax.SAXParseException: The entity name must go inmediately after the '&' in the entity reference.
Exception parsing document: template="scenariosList", line 401 - column 21
This is my last try in javascript:
var modificat = $("#modificatEscenari").val();
var calculat = $("#calculatEscenari").val();
if (calculat) {
$("#calculat").val("Sí");
} else {
$("#calculat").val("No");
$("#calculPendent").val("Sí");
}
if (modificat) {
$("#calculPendent").val("Sí");
}
if (!modificat && calculat) {
$('#calculPendent').val("No");
}
Can anyone tell me what's wrong in this code if (!modificat && calculat) {...
I have read the use of operators in if
statements and it looks good to me.
EDIT
It's wrapped like
<script>
$(document).ready( function () {
....
doing my stuff and the piece of code that trigger the exception
</script>
Thank you.