例如 rich:datatable 中的动态列?

发布于 2024-12-21 23:03:45 字数 258 浏览 4 评论 0原文

我有以下问题: 我使用带有动态标签的表单,每个标签都有相应的输入字段。该表格可以多次发送。我想要一张具有动态列数的表,每列都有一个来自动态表单的标签作为标题。现在,每次发送表单时,都应在相应标题下的每个输入中添加另一行。

我已经尝试过使用各种组件,但没有得到任何有用的结果...

基本上我拥有的是一个带有列标题的列表,并且该列表中的每个元素都有应在其下方列出的 x 值。

我使用的是seam 2.2.2、richfaces 3.3.3 和jsf 1.2。

I have the following problem:
I use a a form with dynamic labels that each has a corresponding inputfield. This form can be sent multiple times. I want a table with a dynamic number of columns were each column has one label from the dynamic form as it's header. Now for each time the form is sent another row should be added with each input under it's corresponding header.

I've tried around some with the various components but have not been getting any useful results...

Basically what I have is one list with column headers and each element in that list has x values that should be listed under it.

I am using seam 2.2.2, richfaces 3.3.3 and jsf 1.2.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧时模样 2024-12-28 23:03:45

rich:columns 确实工作,但请仔细阅读文档中的注释以避免常见的陷阱。

rich:columns does the job, but double read the notes in the documentation to avoid common pitfalls.

許願樹丅啲祈禱 2024-12-28 23:03:45

动态列听起来非常简单,您可以设置输入和布尔值(如果设置了该输入),然后将列设置为等于该输入并使用布尔值渲染它。但你已经因为添加的行而迷失了我,你能详细说明一下吗?

The dynamic columns sounds pretty straightforward, you could set your input and a boolean if that input is set and then set the column to equal that input and render it with the boolean. But you've lost me with the added rows, can you elaborate?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文