我有一个问题,managedBean 没有找到方法
这是我的托管豆
public float res ;
public List<Reglement> lister()
{
List<Reglement> L = regdao.getListR(reglement.getType_reg());
System.out.println(reglement.getType_reg());
System.out.println(this.getDate_debut());
System.out.println(this.getDate_fin());
return L;
}
他是我的 xhtml 文件
<p:dataTable id="dt" var="p" value="#{reglementMB.lister}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="2,5,9" paginator="true" rows="2"
style="width:850px">
<f:facet name="header">
<h:outputText value="RESULTAT = " />
</f:facet>
<p:column>
<f:facet name="header">
<h:outputText value="Montant " />
</f:facet>
<h:outputText value="#{p.reglement.montant_reg}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Date" />
</f:facet>
<h:outputText value="#{p.reglement.date_reg}" />
</p:column>
</p:dataTable>
这是我的错误,它声称托管 bean 没有找到该属性,尽管它存在于托管 bean 中
exception
javax.servlet.ServletException: /RSReglement.xhtml @56,24 value="#{reglementMB.lister}": Property 'lister' not found on type managedBean.ReglementMB
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
cause mère
javax.el.PropertyNotFoundException: /RSReglement.xhtml @56,24 value="#{reglementMB.lister}": Property 'lister' not found on type managedBean.ReglementMB
com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:111)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
javax.faces.component.UIData.getValue(UIData.java:731)
org.primefaces.component.datatable.DataTable.getValue(DataTable.java:729)
org.primefaces.component.api.UIData.getDataModel(UIData.java:581)
javax.faces.component.UIData.getRowCount(UIData.java:356)
org.primefaces.component.api.UIData.calculatePage(UIData.java:156)
org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:178)
org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:74)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1764)
javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)