2

使用 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

我读过rich:subTable 自richfaces 3.0.0 以来可用,但在我的maven 配置中我有4.0 版本。

我错过了什么?

4

1 回答 1

7

它已在 RichFaces 4.0 中删除。您拥有的展示链接适用于 RichFaces 3.3.3。

检查以下文档:

迁移指南的“迭代组件”部分讲述了以下内容:

----------------+---------------------------+------------------------------------
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>.

于 2012-04-18T12:22:24.940 回答