我正在尝试从oneSelectMenu获取itemValue,但此异常已返回。 有谁可以帮助我?
<p:outputLabel for="tipo" value="Tipo "/>
<p:selectOneMenu id="tipo" value="#{pessoaBean.pessoa.tipo}">
<f:selectItem itemLabel="Cliente" itemValue="Cliente"/>
<f:selectItem itemLabel="Funcionário" itemValue="Funcionário"/>
</p:selectOneMenu>
答案 0 :(得分:0)
也许您必须实现javax.faces.Converter并将属性converter="..."
添加到p:selectOneMenu
请参阅示例How to inject @EJB, @PersistenceContext, @Inject, @Autowired, etc in @FacesConverter?