0
I need to perform a validation when selecting some options in the following checkbox:
The rule is this::
If IMPEDITIVE is selected with "S", EXECUTED must be "N". However, both may be N but can never be both S. That is, when selecting one, the other must be downgraded, but the page (which is an editing page) will always be loaded with one of the selected options.
What I’m trying to do so far is this:
comparaImpeditivoExecutado1(ocorrenciaSolicitacaoVO) {
if(ocorrenciaSolicitacaoVO.statusImpeditivo){
ocorrenciaSolicitacaoVO.statusExecutado = false;
}
else {
ocorrenciaSolicitacaoVO.statusExecutado = true;
}
}
But apparently it’s not solving.
You need to pass by parameter who is currently changing, so you check the status of the other, for example:
if(this) other = false;
– Rogerio Santos