I have the following problem:
<select name="cargo" id="selectCargo"
class="form-control show-tick maiuscula" required >
<option value="">ESCOLHA A EMPRESA</option>
<c:forEach items="${filaEmpresa }" var = "filaEmpresa">
<option value="${filaEmpresa.id}"
selected="${funcionario.empresa.id }">${filaEmpresa.id }
</option>
</c:forEach>
</select>
This my select
, is not correctly selecting the ID
of the employee's company.
Ex : ID
is 7 and it is always selecting 10 (which is the last).
You are always selecting the last value, even if funcionario.empresa.id
is the correct value.
I have already debugged and I did not find the point of error.
In this case I'm making an employee change. But this is the only field that is not correct.