1/我最近在我的 postgres 数据库中添加了一个列 (display_order):
2/我已经更新了它的相关实体:
@Column(name = "display_order")
private Integer displayOrder;
public Integer getDisplayOrder() {
return this.displayOrder;
}
public void setDisplayOrder(Integer displayOrder) {
this.displayOrder = displayOrder;
}
3/ 我想使用以下代码在 jsf 页面中使用新列:
<div class="row">
<p:outputLabel for="orderSubject" value="Ordre" styleClass="col-md-3
control-label" />
<div class="col-md-3">
<div class="input-icon right">
<p:spinner id="orderSubject"
value="#ticketSubjectController.selectedSubject.displayOrder}" />
</div>
</div>
</div>
==> 我收到了这个错误:
GRAVE: Servlet.service() for servlet [Faces Servlet] in context with path [/e-Voice] threw exception [/pages/secure/administration/subject/subject.xhtml @118,103 value="#{ticketSubjectController.selectedSubject.displayOrder}": Property 'displayOrder' not found on type tn.ccs.evoice.entity.TicketSubject] with root cause
javax.el.PropertyNotFoundException: Property 'displayOrder' not found on type tn.ccs.evoice.entity.TicketSubject
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:290)
at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:243)
at javax.el.BeanELResolver.property(BeanELResolver.java:377)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:97)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstValue.getValue(AstValue.java:184)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
at javax.faces.component.UIOutput.getValue(UIOutput.java:174)
at javax.faces.component.UIInput.getValue(UIInput.java:291)
at org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:94)
at org.primefaces.util.ComponentUtils.getValueToRender(ComponentUtils.java:58)
at org.primefaces.component.spinner.SpinnerRenderer.encodeInput(SpinnerRenderer.java:122)
at org.primefaces.component.spinner.SpinnerRenderer.encodeMarkup(SpinnerRenderer.java:101)
at org.primefaces.component.spinner.SpinnerRenderer.encodeEnd(SpinnerRenderer.java:66)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:89)
at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:72)
at org.primefaces.component.fieldset.FieldsetRenderer.encodeContent(FieldsetRenderer.java:94)
at org.primefaces.component.fieldset.FieldsetRenderer.encodeMarkup(FieldsetRenderer.java:76)
at org.primefaces.component.fieldset.FieldsetRenderer.encodeEnd(FieldsetRenderer.java:47)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:919)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1903)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1899)
at org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:313)
at org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:271)
at org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:132)
at org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:71)
请问我该怎么办?