I am working with Spring and JSF, and I have a bean where I call a method which changes its value from false to true or vice versa. I collect the value of the 'edit' property, and depending on if it is True or False, do one thing or another.
The problem is that although in the bean its value is already 'true', the method in JavaScript continues to catch it as 'false'.
I'm new to JavaScript and I don't know if I'm missing a fundamental concept.
This is the code.
var editarNuevo = #{configuracionBean.edicion};
if(!editarNuevo){
alert(editarNuevo);
dialog.classList.add('large');
document.getElementById("titleSpan").textContent="#{etiquetas['configuracionP.editar']}";
}else{
alert(editarNuevo);
dialog.classList.remove('large');
}