如何使用JSF渲染div表? [英] How to render a table of divs with JSF?

查看:128
本文介绍了如何使用JSF渲染div表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要绘制一张带有一列和动态行数的表,具体取决于我向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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆