I would like a help, I'm new to Spring MVC and I'm trying to send a numeral value of an Enum that I have in my class, but I'm not getting it, only the Nominal value is accepted.
I would like some help. Thanks
Example:
public enum TipoCliente
{
PessoaFisica,
PessoaJuridica
}
class Clientes
{
@Column(nullable = false)
private TipoCliente tipoCliente;
//getters e setters
}
@RequestMapping(value = "/salvar", method = RequestMethod.POST)
public String salvar(Clientes cliente)
{
clientesDAO.save(cliente);
}
<input type="text" name="tipoCliente" value="0"> <- Não aceita
<input type="text" name="tipoCliente" value="PessoaFisica"> <- Aceita