我正在尝试使用 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 后 rich:subTable 可用,但在我的 maven 配置中我有 4.0 版本。
我错过了什么?
最佳答案
它已在 RichFaces 4.0 中删除。您拥有的展示链接是针对 RichFaces 3.3.3 的。
检查以下文档:
- > Overview of all available RichFaces 4.0 components
- > Live showcase of all available RichFaces 4.0 components
- > Migration guide from RichFaces 3.3.x to 4.0
"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>
.
关于jsf - 标签库支持命名空间 : http://richfaces. org/rich,但没有为名称定义标签:subTable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10204589/