I am getting the error:
javax.faces.FacesException: Value of 'frmrapport:type' must be an array or a collection
from the XHTML file:
<p:selectManyMenu id="type" required="true"
value="#{userReporting.getTypeParId(userReporting.selected)[0].nomType}">
<f:selectItem itemLabel="co" itemValue="co" />
<f:selectItem itemLabel="pi" itemValue="pi" />
<f:selectItem itemLabel="si" itemValue="si" />
</p:selectManyMenu>
from the Java bean:
public List getTypeParId(int id){
return this.genTypeFacade.getTypeParId(id);
}
the problem is that the bean is a List
and I can't convert the list to a String[]
.