"com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException GRAVE: Error Rendering View[/pages/nuance/Create.xhtml] javax.el.ELException: Cannot convert 0 of type class java.lang.String to class primepad.entidades.Produto"
This is because in my <f:selectItem itemLabel="Selecione um Produto" itemValue="0" /> I put the command itemValue = "0". that worked very well in the previous version and this version has stopped working.
If I remove the command itemValue = "0" the application back to work, however if I leave my field filled with nothing of one another due to the error value is passed as a String. What I find is that this new version does not call the M4 he converting so that the implementation is starter, as it did before.
my code:
Code: Select all
<p:selectOneMenu effect="drop" style="width:210px" id="codigoProduto"
value="#{bean.nuance.proCodigo}" converter="produtoConverter" >
<f:selectItem itemLabel="Selecione um Produto" itemValue="0" />
<f:selectItems value="#{bean.lista}" var="prod"
itemLabel="#{prod.proNome}" itemValue="#{prod}" />
</p:selectOneMenu>