JSF 输出文章列表问题
我想在页面输入一个list
做到文章列表那样!
请问如果做??
急啊!给点提示也好
输出的时候会重复一段代码比如:
<div id= "a ">
<div id= "b "> 文章标题 </div>
</div>
在jsp里面用for就可以做到!请问jsf怎样做??????
------解决方案-------------------- <h:dataTable value= "#{View.datas} " var= "row " >
<h:column>
<f:facet name= "header "> <h:outputText value= "ID "/> </f:facet>
<h:outputText value= "#{row.id} "/>
</h:column>
table是循环的
或者jstl
<%@ taglib uri= "http://java.sun.com/jsp/jstl/core " prefix= "c " %>
<c:forEach var= "i " begin= "1 " end= "3 ">
</c:forEach>
------解决方案-------------------- <t:dataTable value= "#{manageBean.resultSet} " var= "v "
id= "SearchResult " rowIndexVar= "index " rows= "10 "
rowCountVar= "10 " cellspacing= "12 " width= "250 " >
<t:column width= "100% ">
<h:outputLink
value= "/Detail.jsf?docid=#{v.docid} "
style= "text-align: left ">
<t:outputText value= "#{v.docname} " />
</h:outputLink>
</t:column>
</t:dataTable>