Tengo un selectOneMenu de primefaces y me está dando error:
Error de conversión al definir el valor 'Base.Categoria@53ac92aa' para 'null Converter'.
Error de conversión al definir el valor 'Base.Categoria@53ac92aa' para 'null Converter'
Este es mi SelectOneMenu:
[Translation]
Hi All,
I have a selectOneMenu of primefaces and I have this error:
Conversion Error setting value 'Base.Categoria@53ac92aa' for 'null Converter'
This is my SelectOneMenu [/translation]
Code: Select all
<p:column headerText="Padre">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{categoria.padre.nombre}" />
</f:facet>
<f:facet name="input">
<p:selectOneMenu id="Sel_padres" value="#{categoria.padre}">
<f:selectItem itemLabel="Seleccione..." itemValue="0" noSelectionOption="true" />
<f:selectItems value="#{categoriaBean.categorias}" var="categoriaPadre" itemLabel="#{categoriaPadre.nombre}" itemValue="#{categoriaPadre}"></f:selectItems>
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
Es claramente una celda de un dataTable de primefaces... el value del SelectOneMenu es un objeto, y el itemvalue de los items también lo es de la misma clase.... una categoría puede tener un padre y éste padre es tipo categoría.... el error pareciera ser de casting... pero es raro porque ambos valores son del mismo tipo... alguien me podría decir porque?
[Translation]
Clearly this is a cell in a dataTable of primefaces... the value of the SelectOneMenu is an object, and the itemvalue of the items are the same class too... a category could have a parent and this parent is a category type... the error looks like a casting error but is rare because both values are the same type... somebody could tell me why? Thanks a lot!
[/Translation]