gpt4 book ai didi

java - Richfaces:使用 rich:subtable 的 rich:datatable rowspan

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:33:20 30 4
gpt4 key购买 nike

我使用 Richfaces、Seam 和 JSF,我想要如下内容:

alt text

我已经使用像这样的 rich:subtable 在一定程度上管理了它:

<rich:dataTable
value="#{backingBean.companyList}"
rows="100"
var="company">
<f:facet name="header">
<rich:columnGroup>
<rich:column>Company Name</rich:column>
<rich:column>Company Email</rich:column>
<rich:column>Product Name</rich:column>
<rich:column>Product Email</rich:column>
</rich:columnGroup>
</f:facet>
<rich:subTable value="#{company.products}" var="product" rowKeyVar="rowKey">
<rich:column rowspan="#{company.products.size()}" rendered="#{rowKey eq 0}">
#{company.name}
</rich:column>
<rich:column rowspan="#{company.products.size()}" rendered="#{rowKey eq 0}">
#{company.email}
</rich:column>
<rich:column>
#{product.name}
</rich:column>
<rich:column>
#{product.email}
</rich:column>
</rich:subTable>

问题是那些没有NO 产品的公司,根本就没有渲染。我想要的是呈现它们,并将剩余的行(特定于产品的列)留空。

有办法吗?

注意:我也试过嵌套的 rich:datatables,但内部列不与包含标题的外部列重叠。使用 rich:subtable,内部列与外部列重叠并显示良好。

更新:

我创建了一个 Google Code 项目(一个简单的 Maven 项目)来准确显示问题所在。

http://code.google.com/p/richfaces-rowspan/

最佳答案

在 Richfaces 论坛中进行后续讨论并给出答案(实际上是 Richfaces 问题)。

http://community.jboss.org/message/541819#541819

关于java - Richfaces:使用 rich:subtable 的 rich:datatable rowspan,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2691393/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com