如何使用JSF渲染div表? [英] How to render a table of divs with JSF?
问题描述
我需要绘制一张带有一列和动态行数的表,具体取决于我向JSF提交的票据数量,而无需使用扩展名作为PrimeFaces.
I need to draw a table with a column and a dynamic number of rows depending on a number of bills that I file with JSF without using an extension as PrimeFaces.
我一直在寻找如何在内部使用h:panelGroup
组件和h:panelGroup
组件来查找帐单的方法.
I've been looking for how to use the component h:panelGrid
with h:panelGroup
inside for bills without finding a solution.
欢迎您的建议
推荐答案
如果要创建div表,一种方法是使用迭代标签:
If you want to create a table of divs, one way would be to use iterating tag :
查看:
<ui:repeat value="#{bean.rows}" var="row">
<div>
#{row.data}
</div>
</ui:repeat>
Bean:
public List<YourObject> getRows()
{
return this.rows;
}
这只是一个草稿,但它向您显示了方式.如果您添加更多信息来构造数据,将更容易给出更详细的答案.
This is only a draft, but it show you the way. If you add more informations how your data is constructed, It will be easier to give a more detailed answer.
这篇关于如何使用JSF渲染div表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!