不确定我是否缺少此过程中的某个步骤,或者它只是我刚接触此结构时的语法。我现在只想回到我的bean,但是如果需要的话,我可以设置我的逻辑类,模型类和其他任何东西。这就是我的JSP的样子:
<h:dataTable
id="viewExampleTable"
value="#{ExampleBean.exampleList}"
binding="#{ExampleBean.exampleTable}"
var="example"
styleClass="dataTable" border="1"
style="width: 500px; word-wrap: break-word;"
columnClasses="colWidth80,colWidth80,colWidth80,colWidth80">
<h:column>
<h:outputText value="example.Id"></h:outputText>
</h:column>
<h:column>
<h:outputText value="example.importDate"></h:outputText>
</h:column>
<h:column>
<h:outputText value="example.serviceId"></h:outputText>
</h:column>
<h:column>
<h:outputText value="example.rowTimestamp"></h:outputText>
</h:column>
</h:dataTable>
这是Bean:
private HtmlDataTable exampleTable;
private ArrayList exampleList = new ArrayList();
public HtmlDataTable getExampleTable(){
return this.exampleTable;
}
public void setExampleTable(HtmlDataTable dataTable){
this.exampleTable = dataTable;
}
public ArrayList<Example> getExample(){
ArrayList<Example> list = ExampleLogic.getExampleRecords();
this.exampleList = list;
return this.exampleList
}
public void setExample(ArrayList<Example> list){
this.exampleList = list;
}
我遇到的问题是,每当将其部署到服务器时,我都会收到此错误:
javax.faces.el.PropertyNotFoundException:从类型为examplePath.view.ExampleBean的bean获取属性'exampleList'时出错”>
还有一个空白屏幕。感谢您提供的帮助,因为我已经尽了最大努力进行研究,但对如何进行下去一无所知。
不确定我是否缺少此过程中的某个步骤,或者它只是我刚接触此结构时的语法。我现在只想回到我的bean,但是如果需要的话,我可以设置我的逻辑类,...
通过将Bean中的getter重命名为jsp数据表的value参数中所调用的名称,解决了此问题。