日期:2014-05-18  浏览次数:20661 次

用JSF如何显示一个LIST对象的数据?
有已经从数据库查询出来了几十数据,放到一个LIST里面了,那么我怎么用JSF放数据显示在页面呢?除了使用GRID之外,因为我使用的GRID不能刷新.

------解决方案--------------------
用 <h:dataTable>
<f:view>
<h:form id= "dataTableForm ">
<h:dataTable rendered= "true " border= "1 "
id= "dataTableTest "
value= "#{dataTableTest.data} " var= "item ">
<h:column>
<h:outputText value= "#{item} " />
</h:column>
</h:dataTable>
<h:commandButton value= "Preview " action= "#{dataTableTest.previewMe} " />
</h:form>

------解决方案--------------------
http://www.irian.at/myfaces/sortTable.jsf 的排序并不完美,比如,当你在第二页面排序的时候,结果并不是排序前第二页面中的内容了,不知道这个如何解决?
------解决方案--------------------
关注下排序
------解决方案--------------------
记住:还要进行分页处理