例如 rich:datatable 中的动态列?
我有以下问题: 我使用带有动态标签的表单,每个标签都有相应的输入字段。该表格可以多次发送。我想要一张具有动态列数的表,每列都有一个来自动态表单的标签作为标题。现在,每次发送表单时,都应在相应标题下的每个输入中添加另一行。
我已经尝试过使用各种组件,但没有得到任何有用的结果...
基本上我拥有的是一个带有列标题的列表,并且该列表中的每个元素都有应在其下方列出的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
rich:columns 确实工作,但请仔细阅读文档中的注释以避免常见的陷阱。
rich:columns does the job, but double read the notes in the documentation to avoid common pitfalls.
动态列听起来非常简单,您可以设置输入和布尔值(如果设置了该输入),然后将列设置为等于该输入并使用布尔值渲染它。但你已经因为添加的行而迷失了我,你能详细说明一下吗?
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?