当我按下插入按钮时,我得到标题上指示的错误
'null Converter' 的转换错误设置值'2013-10-26'
<h:form id="formulario">
<h:outputLabel for="date">Plazo</h:outputLabel>
<h:inputText id="date" required="true" requiredMessage="Campo Obligatorio" value="#{aaaNewDetalles.criterioAaa.plazo}"/>
<h:message for="date" style="color: red;"/>
<h:commandButton actionListener="#{aaaNewDetalles.add()}" value="Ingresar"/>
</h:form>
表单由此类管理:
@ManagedBean(name = "aaaNewDetalles")
@ViewScoped
public class aaaNewDetallesBean {
private CriterioAaaController controller;
private CriterioAaa criterioAaa;
@PostConstruct
public void init(){
controller= new CriterioAaaController();
criterioAaa= new CriterioAaa();
}
public void add(){
controller.save(criterioAaa);
}
public CriterioAaa getCriterioAaa() {
return criterioAaa;
}
public void setCriterioAaa(CriterioAaa criterioAaa) {
this.criterioAaa = criterioAaa;
}
}
对象 CriterioAaa:
import java.sql.Date;
@Table(name = "criterio_aaa", schema = "", catalog = "ciclos_calidad")
@Entity
public class CriterioAaa extends Entidad implements Serializable {
private Date plazo;
public Date getPlazo() {
return plazo;
}
public void setPlazo(Date plazo) {
this.plazo = plazo;
}
}