已在视图中找到组件ID。重复ui:执行ajax功能后重复元素

已在视图中找到组件ID。重复ui:执行ajax功能后重复元素,ajax,jsf,primefaces,uirepeat,Ajax,Jsf,Primefaces,Uirepeat,我使用的是JSF Mojarra 2.2和Primefaces 4.0 在我的页面上,我使用呈现一些数据表。通过单击单行元素的name列,该行的其他信息将通过ajax加载,并显示在单独面板中的表格下方。页面呈现正常,并在开始时按预期运行。单击几下并通过ajax加载其他信息后,我得到: java.lang.IllegalStateException: Component ID has already been found in the view. 详细的错误消息 +id:dcvForm 类型

我使用的是JSF Mojarra 2.2和Primefaces 4.0

在我的页面上,我使用
呈现一些数据表。通过单击单行元素的name列,该行的其他信息将通过ajax加载,并显示在单独面板中的表格下方。页面呈现正常,并在开始时按预期运行。单击几下并通过ajax加载其他信息后,我得到:

java.lang.IllegalStateException: Component ID has already been found in the view. 
详细的错误消息

+id:dcvForm
类型:javax.faces.component.html。HtmlForm@19aa202
+id:j_idt34
类型:org.primefaces.component.scrollpanel。ScrollPanel@1025e3c
+id:j_idt35
类型:org.primefaces.component.outputpanel。OutputPanel@78eb00

+id:j_idt40正如BalusC在评论中所说,我用
替换
,从而解决了错误。

到底是哪个Mojarra版本?2.2.0? 试过最新的吗?无论如何,试着给受影响的组件一个固定的ID。这通常会修复这种复杂的状态,从而节省麻烦。或者,将
替换为
。与Mojarra的
UIRepeat
相反,基于
UIData
的组件具有更健壮的状态保存实现。我已经更新到Mojarra 2.2.5,但错误仍然存在。给出受影响的
只会导致
+id:tableRepeat好的,试试另一个中继器组件。Mojarra的UIRepeat以前充满了保存状态的bug。已经修复了很多问题,但这显然是另一个疏忽。我尝试了
,现在再也没有出现错误。非常感谢。但是,我的内容以前是相邻显示的(垂直),现在是在彼此下面显示的(水平)。您有没有提示我如何使用
实现垂直定位?也许您忘记了
type=“none”
+id: dcvForm
 type: javax.faces.component.html.HtmlForm@19aa202
  +id: j_idt34
   type: org.primefaces.component.scrollpanel.ScrollPanel@1025e3c
    +id: j_idt35
     type: org.primefaces.component.outputpanel.OutputPanel@78eb00
      +id: j_idt40  <===============
       type: com.sun.faces.facelets.component.UIRepeat@194a115
        +id: j_idt41
         type: org.primefaces.component.datatable.DataTable@db8d63
          +id: j_idt42
           type: javax.faces.component.html.HtmlOutputText@1f6f6f
          +id: j_idt43
           type: org.primefaces.component.column.Column@1ccf811
            +id: j_idt44
             type: javax.faces.component.html.HtmlOutputText@1b22d38
            +id: j_idt45
             type: javax.faces.component.html.HtmlOutputText@b6cbe4
          +id: j_idt46
           type: org.primefaces.component.column.Column@103f78a
            +id: j_idt47
             type: javax.faces.component.html.HtmlOutputText@1708cb9
            +id: j_idt48
             type: javax.faces.component.html.HtmlOutputText@26ed67
          +id: j_idt49
           type: org.primefaces.component.column.Column@1ac1194
            +id: j_idt50
             type: javax.faces.component.html.HtmlOutputText@1b61dd7
            +id: j_idt51
             type: javax.faces.component.html.HtmlOutputText@1614aa1
          +id: j_idt52
           type: org.primefaces.component.column.Column@6a93d0
            +id: j_idt53
             type: javax.faces.component.html.HtmlOutputText@10e3ef3
            +id: j_idt54
             type: javax.faces.component.html.HtmlOutputText@46fd81
          +id: j_idt55
           type: org.primefaces.component.column.Column@ad5082
            +id: j_idt56
             type: javax.faces.component.html.HtmlOutputText@808a3a
            +id: j_idt57
             type: javax.faces.component.html.HtmlOutputText@f31547
      +id: j_idt40  <===============
       type: com.sun.faces.facelets.component.UIRepeat@fa2760
        +id: j_idt41
         type: org.primefaces.component.datatable.DataTable@12f4785
          +id: j_idt42
           type: javax.faces.component.html.HtmlOutputText@1007ab4
          +id: j_idt43
           type: org.primefaces.component.column.Column@77deb5
            +id: j_idt44
             type: javax.faces.component.html.HtmlOutputText@1be73ae
            +id: j_idt45
             type: javax.faces.component.html.HtmlOutputText@9cd7aa
          +id: j_idt46
           type: org.primefaces.component.column.Column@113119b
            +id: j_idt47
             type: javax.faces.component.html.HtmlOutputText@e8ee3b
            +id: j_idt48
             type: javax.faces.component.html.HtmlOutputText@7083c1
          +id: j_idt49
           type: org.primefaces.component.column.Column@da0bb8
            +id: j_idt50
             type: javax.faces.component.html.HtmlOutputText@1378ca7
            +id: j_idt51
             type: javax.faces.component.html.HtmlOutputText@1f360fc
          +id: j_idt52
           type: org.primefaces.component.column.Column@16454e1
            +id: j_idt53
             type: javax.faces.component.html.HtmlOutputText@aea7
            +id: j_idt54
             type: javax.faces.component.html.HtmlOutputText@ca6240
          +id: j_idt55
           type: org.primefaces.component.column.Column@f8833d
            +id: j_idt56
             type: javax.faces.component.html.HtmlOutputText@17033ef
            +id: j_idt57
             type: javax.faces.component.html.HtmlOutputText@161bdc8
      +id: j_idt36
       type: org.primefaces.component.datatable.DataTable@8c5a93
        +id: j_idt37
         type: javax.faces.component.html.HtmlOutputText@8ea6b9
        +id: j_idt38
         type: org.primefaces.component.column.Column@163dfdf
          +id: j_idt39
           type: javax.faces.component.html.HtmlOutputText@1fec9fc
          +id: ElementName
           type: org.primefaces.component.commandlink.CommandLink@7edb15
          +id: ceIndex
           type: javax.faces.component.html.HtmlInputHidden@617652
      +id: j_idt40
       type: com.sun.faces.facelets.component.UIRepeat@9f1948
        +id: j_idt41
         type: org.primefaces.component.datatable.DataTable@134c649
          +id: j_idt42
           type: javax.faces.component.html.HtmlOutputText@1c60a38
          +id: j_idt43
           type: org.primefaces.component.column.Column@c9054a
            +id: j_idt44
             type: javax.faces.component.html.HtmlOutputText@17a7e4d
            +id: j_idt45
             type: javax.faces.component.html.HtmlOutputText@fa11ca
          +id: j_idt46
           type: org.primefaces.component.column.Column@1a5e64c
            +id: j_idt47
             type: javax.faces.component.html.HtmlOutputText@b2c0d7
            +id: j_idt48
             type: javax.faces.component.html.HtmlOutputText@1929f1c
          +id: j_idt49
           type: org.primefaces.component.column.Column@10be919
            +id: j_idt50
             type: javax.faces.component.html.HtmlOutputText@f47006
            +id: j_idt51
             type: javax.faces.component.html.HtmlOutputText@1e6c683
          +id: j_idt52
           type: org.primefaces.component.column.Column@1f2e85c
            +id: j_idt53
             type: javax.faces.component.html.HtmlOutputText@7517ff
            +id: j_idt54
             type: javax.faces.component.html.HtmlOutputText@17a69a8
          +id: j_idt55
           type: org.primefaces.component.column.Column@1aececc
            +id: j_idt56
             type: javax.faces.component.html.HtmlOutputText@18ac146
            +id: j_idt57
             type: javax.faces.component.html.HtmlOutputText@9714e6
  +id: j_idt58
   type: 
        <p/>

  +id: filterInfoPanel
   type: org.primefaces.component.outputpanel.OutputPanel@dd2f52
    +id: j_idt59
     type: com.sun.faces.facelets.component.UIRepeat@14ddafe
      +id: j_idt60
       type: org.primefaces.component.outputpanel.OutputPanel@64760f
        +id: j_idt61
         type: javax.faces.component.html.HtmlOutputLabel@183001f
        +id: j_idt62
         type: 
                    <p/>

        +id: j_idt63
         type: javax.faces.component.html.HtmlOutputLabel@17d098a
    +id: ajaxStatusPanel
     type: org.primefaces.component.ajaxstatus.AjaxStatus@1fd5640
      +id: j_idt64
       type: javax.faces.component.html.HtmlGraphicImage@1299e6a
      +id: j_idt65
       type: javax.faces.component.html.HtmlGraphicImage@15f6084
+id: j_idt66
 type:          
    </div>