2012-04-18 23 views
2

在JSF中,我試圖讓一個包含子表(如本例中)的表標籤庫支持的命名空間:http://richfaces.org/rich,但沒有標籤被用於名定義:子表

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以來,子表格是可用的,但在我的maven配置中,我有4.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>

+0

太棒了!非常感謝 – 2012-04-19 06:48:17

相關問題