使用Jsf我正在尝试创建一个包含子表的表(如此示例)
http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?c=dataTable
这是我的代码
<rich:dataTable id="tableExample" cellpadding="0" cellspacing="0" width="700" border="0" var="var" value="#{myBean.list}" headerClass="capcalera" styleClass="taula">
<rich:column>
<f:facet name="header">ID</f:facet>
<h:outputText value="${var.idSollicitud}" />
</rich:column>
<rich:column>
<f:facet name="header">Codi OVT</f:facet>
<h:outputText value="${var.codeTest}" />
</rich:column>
<rich:subTable
onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#000000'"
var="expense"
value="#{peticioService.list}">
<rich:column>
<f:facet name="header">HEADER SUBTABLE</f:facet>
<h:outputText value="HELLO"/>
</rich:column>
</rich:subTable>
</rich:dataTable>
但是,我收到此错误消息:
Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: subTable
我读过那么丰富:自richfaces 3.0.0以来,subTable可用,但在我的maven配置中我有4.0版本。
我缺少什么?
答案 0 :(得分:7)
它已在RichFaces 4.0中删除。你在那里展示的链接是RichFaces 3.3.3。
检查以下文档:
迁移指南的"Iteration components"部分说明如下:
----------------+---------------------------+------------------------------------
RichFaces 3.3.3 | RichFaces 4.x | Changes
----------------+---------------------------+------------------------------------
subTable | not implemented for Final | n/a. But that lightweight variant
| | should be discussed and implemented
| | in future.
您在RichFaces 4.x中最接近的是<rich:collapsibleSubTable>
。