pe:masterDetail problems - doesn't navigate

Community Driven Extensions Project
jakorsme
Posts: 58
Joined: 10 Dec 2010, 02:43

05 Sep 2012, 18:57

Tried removing the id - basically the same error.

Code: Select all

SEVERE: JSF1007: Duplicate component ID form:userTable:j_id2 found in view.
SEVERE: +id: j_id1
 type: javax.faces.component.UIViewRoot@5e7c4bd9
  +id: javax_faces_location_HEAD
   type: com.sun.faces.component.ComponentResourceContainer@2afd2aed
    +id: j_id10
     type: javax.faces.component.UIOutput@530d43a7
    +id: j_id11
     type: javax.faces.component.UIOutput@bd4b38a
    +id: j_id12
     type: javax.faces.component.UIOutput@39572f17
    +id: j_id13
     type: javax.faces.component.UIOutput@ad4ac6a
    +id: j_id14
     type: javax.faces.component.UIOutput@108368b4
    +id: j_id15
     type: javax.faces.component.UIOutput@234f09e4
  +id: j_idt1
   type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +id: j_idt2
   type: <html xmlns="http://www.w3.org/1999/xhtml">
    
  +id: j_idt3
   type: javax.faces.component.UIOutput@1a1269d8
  +id: j_idt4
   type: javax.faces.component.UIOutput@2ee2f147
    +id: j_idt5
     type: org.primefaces.component.layout.Layout@354e845d
      +id: j_idt6
       type: org.primefaces.component.layout.LayoutUnit@35d41102
        +id: j_idt7
         type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        +id: j_idt8
         type: <html xmlns="http://www.w3.org/1999/xhtml">
    
        +id: j_idt9
         type: javax.faces.component.UIOutput@75a8b5e9
        +id: j_idt10
         type: javax.faces.component.UIOutput@173f1058
        +id: j_idt11
         type: 
</html>
      +id: j_idt12
       type: org.primefaces.component.layout.LayoutUnit@2d4a0d54
        +id: j_idt13
         type: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        +id: j_idt14
         type: <html xmlns="http://www.w3.org/1999/xhtml">
    
        +id: j_idt15
         type: javax.faces.component.UIOutput@58b11d06
        +id: j_idt16
         type: javax.faces.component.UIOutput@53e8a267
        +id: j_idt17
         type: 
</html>
      +id: j_idt18
       type: org.primefaces.component.layout.LayoutUnit@4dfe433a
        +id: j_idt19
         type: javax.faces.component.html.HtmlForm@6fefbcd6
          +id: j_idt20
           type: org.primefaces.component.menu.Menu@6456bf03
            +id: j_idt21
             type: org.primefaces.component.submenu.Submenu@7b16916b
              +id: j_idt22
               type: org.primefaces.component.menuitem.MenuItem@6a546ef
              +id: j_idt23
               type: org.primefaces.component.menuitem.MenuItem@4cd3f851
            +id: j_idt24
             type: org.primefaces.component.submenu.Submenu@7053b53e
              +id: j_idt25
               type: org.primefaces.component.menuitem.MenuItem@7a0330f
              +id: j_idt26
               type: org.primefaces.component.menuitem.MenuItem@267821b2
            +id: j_idt27
             type: org.primefaces.component.submenu.Submenu@18ec40d9
              +id: j_idt28
               type: org.primefaces.component.menuitem.MenuItem@3e957357
              +id: j_idt29
               type: org.primefaces.component.menuitem.MenuItem@45c774da
            +id: j_idt30
             type: org.primefaces.component.submenu.Submenu@29c8b800
              +id: j_idt31
               type: org.primefaces.component.menuitem.MenuItem@38a81d6e
              +id: j_idt32
               type: org.primefaces.component.menuitem.MenuItem@25243dd1
            +id: j_idt33
             type: org.primefaces.component.submenu.Submenu@6e567763
              +id: j_idt34
               type: org.primefaces.component.menuitem.MenuItem@6eb83d2c
            +id: j_idt35
             type: org.primefaces.component.submenu.Submenu@1b84c7e
              +id: j_idt36
               type: org.primefaces.component.menuitem.MenuItem@6aa5e513
              +id: j_idt37
               type: org.primefaces.component.menuitem.MenuItem@31627918
      +id: j_idt38
       type: org.primefaces.component.layout.LayoutUnit@37fc2ffc
        +id: form
         type: javax.faces.component.html.HtmlForm@db2661b
          +id: messages
           type: org.primefaces.component.growl.Growl@3b4d7da3
          +id: j_idt39
           type: javax.faces.component.html.HtmlPanelGroup@5c7376bf
            +id: masterDetail
             type: org.primefaces.extensions.component.masterdetail.MasterDetail@20792504
              +id: masterDetail_bc
               type: org.primefaces.component.breadcrumb.BreadCrumb@716d3a43
                +id: masterDetail_bcItem_1
                 type: org.primefaces.component.menuitem.MenuItem@3a0c3ee2
                  +id: masterDetail_bcItem_1_sdr
                   type: javax.faces.component.UIParameter@79f48533
                  +id: masterDetail_bcItem_1_cl
                   type: javax.faces.component.UIParameter@245515d2
                  +id: masterDetail_bcItem_1_sl
                   type: javax.faces.component.UIParameter@4e0ba0a0
                +id: masterDetail_bcItem_2
                 type: org.primefaces.component.menuitem.MenuItem@5d5e9067
                  +id: masterDetail_bcItem_2_sdr
                   type: javax.faces.component.UIParameter@6b5a8a14
                  +id: masterDetail_bcItem_2_cl
                   type: javax.faces.component.UIParameter@51f5e1c
                  +id: masterDetail_bcItem_2_sl
                   type: javax.faces.component.UIParameter@4e5b82e4
              +id: j_idt40
               type: org.primefaces.extensions.component.masterdetail.MasterDetailLevel@59ee6eec
                +id: j_idt41
                 type: javax.faces.component.html.HtmlPanelGroup@34b47614
                  +id: j_idt42
                   type: javax.faces.component.html.HtmlOutputFormat@33b43614
                +id: userTable
                 type: org.primefaces.component.datatable.DataTable@7c4a7590
                  +id: j_idt43
                   type: javax.faces.component.html.HtmlPanelGroup@7c6c80af
                    +id: j_idt44
                     type: javax.faces.component.html.HtmlOutputFormat@3774a0fa
                  +id: j_idt45
                   type: org.primefaces.component.column.Column@49f49987
                    +id: cmdLink
                     type: org.primefaces.component.commandlink.CommandLink@598b93ff
                      +id: j_id2
                       type: javax.faces.component.UIParameter@5aa17846
                      +id: j_id3
                       type: javax.faces.component.UIParameter@1edf6a26
                      +id: j_id2
                       type: javax.faces.component.UIParameter@5db1f49f
                      +id: j_id3
                       type: javax.faces.component.UIParameter@4e3322c7
                      +id: j_id2
                       type: javax.faces.component.UIParameter@7f305eec
                      +id: j_id3
                       type: javax.faces.component.UIParameter@40a81930
                      +id: j_id2
                       type: javax.faces.component.UIParameter@5c0dbf79
                      +id: j_id3
                       type: javax.faces.component.UIParameter@a95d026
                  +id: j_idt46
                   type: org.primefaces.component.column.Column@71947437
                    +id: j_idt47
                     type: javax.faces.component.html.HtmlOutputText@495a0122
                  +id: j_idt48
                   type: org.primefaces.component.column.Column@340084cd
                    +id: j_idt49
                     type: javax.faces.component.html.HtmlOutputText@e0ec967
              +id: j_idt50
               type: org.primefaces.extensions.component.masterdetail.MasterDetailLevel@6cc89066
                +id: userDetail
                 type: javax.faces.component.html.HtmlPanelGrid@35a81c3
                  +id: j_idt51
                   type: javax.faces.component.html.HtmlOutputText@63805055
                  +id: j_idt52
                   type: org.primefaces.component.inputtext.InputText@7d1a2f7b
                  +id: j_idt53
                   type: javax.faces.component.html.HtmlOutputText@42237467
                  +id: j_idt54
                   type: org.primefaces.component.inputtext.InputText@25af381d
                  +id: j_idt55
                   type: javax.faces.component.html.HtmlOutputText@128d0b3f
                  +id: j_idt56
                   type: org.primefaces.component.inputtext.InputText@69dd5e9c
    +id: filterEdit
     type: org.primefaces.component.dialog.Dialog@446e8a10
      +id: display
       type: org.primefaces.component.panelgrid.PanelGrid@352a4389
        +id: j_idt57
         type: org.primefaces.component.row.Row@69b7f2a3
          +id: j_idt58
           type: org.primefaces.component.column.Column@2b9ae18e
            +id: j_idt59
             type: javax.faces.component.html.HtmlOutputLabel@454e47ff
          +id: j_idt60
           type: org.primefaces.component.column.Column@1658d9e5
          +id: j_idt61
           type: org.primefaces.component.column.Column@234954d9
            +id: j_idt62
             type: javax.faces.component.html.HtmlOutputLabel@236184a8
          +id: j_idt63
           type: org.primefaces.component.column.Column@574c43bd
          +id: j_idt64
           type: org.primefaces.component.column.Column@4ff35a11
            +id: j_idt65
             type: javax.faces.component.html.HtmlOutputLabel@719e3b18
        +id: j_idt66
         type: org.primefaces.component.row.Row@4b39deee
          +id: j_idt67
           type: org.primefaces.component.column.Column@445b01d7
            +id: j_idt68
             type: org.primefaces.component.inputtext.InputText@32d5ed50
          +id: j_idt69
           type: org.primefaces.component.column.Column@7acf3942
          +id: j_idt70
           type: org.primefaces.component.column.Column@3ab85b0b
            +id: j_idt71
             type: org.primefaces.component.spinner.Spinner@1d614d4b
          +id: j_idt72
           type: org.primefaces.component.column.Column@5f1985fe
          +id: j_idt73
           type: org.primefaces.component.column.Column@4ac1779
            +id: j_idt74
             type: org.primefaces.component.inputtext.InputText@3e390b54
        +id: j_idt75
         type: org.primefaces.component.row.Row@1316d7b6
          +id: j_idt76
           type: org.primefaces.component.column.Column@40abf784
            +id: j_idt77
             type: org.primefaces.component.spacer.Spacer@5a071c47
        +id: j_idt78
         type: org.primefaces.component.row.Row@8d1a77e
          +id: j_idt79
           type: org.primefaces.component.column.Column@7c4b45b7
            +id: j_idt80
             type: javax.faces.component.html.HtmlOutputLabel@31ce3121
        +id: j_idt81
         type: org.primefaces.component.row.Row@57fb8712
          +id: j_idt82
           type: org.primefaces.component.column.Column@4260dbde
            +id: j_idt83
             type: org.primefaces.component.inputtextarea.InputTextarea@6502eddd
        +id: j_idt84
         type: org.primefaces.component.row.Row@234e7bfa
          +id: j_idt85
           type: org.primefaces.component.column.Column@75ad6c31
            +id: j_idt86
             type: javax.faces.component.html.HtmlOutputLabel@4c9a4152
        +id: j_idt87
         type: org.primefaces.component.row.Row@233695c8
          +id: j_idt88
           type: org.primefaces.component.column.Column@54a38f87
            +id: j_idt89
             type: org.primefaces.component.inputtextarea.InputTextarea@3e24137a
      +id: j_idt90
       type:  
 <!--                       
                        <h:panelGrid id="display" columns="1" cellpadding="4">
                            <h:panelGrid id="displayHeader" columns="3" cellpadding="16">  
                                <f:facet name="header"> 
                                </f:facet>
                                <h:outputText value="Name:" /> 
                                <p:inputText value="#{filter.selectedFilter.name}" readonly="true" label="Name:" />
                                <h:outputText value="#{filter.selectedFilter.name}" />
                                <h:outputText value="Aggression:" />  
                                <h:outputText value="#{filter.selectedFilter.aggression}" /> 
                                <h:outputText value="Type:" />  
                                <h:outputText value="#{filter.selectedFilter.filterType}" /> 
                            </h:panelGrid>
                            <h:panelGrid id="displayBody" columns="2" cellpadding="4">     
                                <h:outputText value="Scope:" />  
                                <h:outputText value="#{filter.selectedFilter.scope}" />  
                            </h:panelGrid> 
                        </h:panelGrid>
 -->
                    
  +id: j_idt91
   type: 
</html>

SEVERE: Error Rendering View[/users.xhtml]
java.lang.IllegalStateException: Component ID form:userTable:j_id2 has already been found in the view.  
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:821)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.util.Util.checkIdUniqueness(Util.java:805)
	at com.sun.faces.application.view.StateManagementStrategyImpl.saveView(StateManagementStrategyImpl.java:140)
	at com.sun.faces.application.StateManagerImpl.saveView(StateManagerImpl.java:133)
	at javax.faces.application.StateManager.getViewState(StateManager.java:553)
	at com.sun.faces.context.PartialViewContextImpl.renderState(PartialViewContextImpl.java:409)
	at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:293)
	at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:183)
	at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:981)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:390)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)

WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: CDATA tags may not nest
	at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:630)
	at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
	at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
	at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:172)
	at org.primefaces.extensions.component.ajaxerrorhandler.AjaxExceptionHandler.handlePartialResponseError(AjaxExceptionHandler.java:122)
	at org.primefaces.extensions.component.ajaxerrorhandler.AjaxExceptionHandler.handle(AjaxExceptionHandler.java:77)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:410)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1534)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
	at java.lang.Thread.run(Thread.java:722)
Primefaces: 4.0
Primefaces-extensions: 1.1.0
JSF: 2.2

Glassfish 4
Netbeans 7.3

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

05 Sep 2012, 20:03

But
SEVERE: JSF1007: Duplicate component ID form:userTable:j_id2 found in view.
is not MasterDetail related issue. Do you have the same ui:include on the same page maybe? What component has ID form:userTable:j_id2? Have you tried the same code with PF versions earlier than 3.4?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

jakorsme
Posts: 58
Joined: 10 Dec 2010, 02:43

05 Sep 2012, 20:14

I am not on 3.4 I'm on 3.3.1
Please see attached code (and errors) at the beginning of this thread. The id2 is right in the middle of the masterDetail code. In fact it is like masterdetail is going through some kind of loop and repeatedly autogenerating id2s
Primefaces: 4.0
Primefaces-extensions: 1.1.0
JSF: 2.2

Glassfish 4
Netbeans 7.3

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

05 Sep 2012, 21:52

I used and use PF 3.x + Mojarra 2.1.10 and never saw this issue. MasterDetail is heavy used by me, by the way. Ok, I will look into this issue. One question. Can you maybe provide a very small sample / project to reproduce this issue? I only see ui:define in your sample. What is the difference in comparison to the showcase?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

jakorsme
Posts: 58
Joined: 10 Dec 2010, 02:43

05 Sep 2012, 22:46

There are really only two additional relevant files.
The first is the layout:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        
    </h:head>

    <h:body>

        <p:layout fullPage="true">  

            <p:layoutUnit position="north" size="100" header="Top" resizable="true" collapsible="true">  
                <ui:include src="/templates/topT.xhtml" />  
            </p:layoutUnit>  

            <p:layoutUnit position="south" size="100" header="Bottom" resizable="true" collapsible="true">  
                <ui:include src="/templates/bottomT.xhtml" />  
            </p:layoutUnit>  

            <p:layoutUnit position="west" size="300" header="Left" resizable="true" collapsible="true">                  
                <ui:include src="/templates/leftT.xhtml" />
            </p:layoutUnit> 

            <p:layoutUnit position="center">  
                <ui:insert name="centerT" />  
            </p:layoutUnit>

        </p:layout>
        <p:dialog id="filterEdit" header="Filter" widgetVar="filterDialog" resizable="true"  
                              minWidth="900" minHeight="800" showEffect="clip" hideEffect="fold" modal="true"> 
            
            <p:panelGrid id="display" style="margin-top:10px">  
                
                <p:row>  
                    <p:column style="font-weight: bold;">
                        <h:outputLabel value="Name" /> 
                    </p:column>  
                    <p:column style="min-width: 100px">
                        
                    </p:column>
                    <p:column style="font-weight: bold;">
                        <h:outputLabel value="Aggression" />
                    </p:column>
                    <p:column style="min-width: 100px">
                        
                    </p:column>
                    <p:column style="font-weight: bold;">
                        <h:outputLabel value="Type" />
                    </p:column> 

                </p:row>  
                <p:row>  
                    <p:column>
                        <p:inputText value="#{filter.selectedFilter.name}" readonly="true" />
                    </p:column>
                    <p:column style="min-width: 100px">
                        
                    </p:column>
                    <p:column >
                        <p:spinner value="#{filter.selectedFilter.aggression}" />
                    </p:column> 
                    <p:column style="min-width: 100px">
                        
                    </p:column>
                    <p:column >
                        <p:inputText value="#{filter.selectedFilter.filterType}" readonly="true" />
                    </p:column>
                </p:row>  
                <p:row>  
                    <p:column colspan="7" styleClass="ui-widget-header">  
                        <p:spacer height="20"/>  
                    </p:column>  
                </p:row>  
                <p:row>
                    <p:column style="font-weight: bold;" colspan="5">
                        <h:outputLabel value="Description" />
                    </p:column>
                </p:row>
                <p:row>
                    <p:column colspan="6">
                        <p:inputTextarea value="#{filter.selectedFilter.description}" />
                    </p:column>  

                </p:row>
                <p:row>
                    <p:column style="font-weight: bold;" colspan="5">
                        <h:outputLabel value="Regular Expression Pattern" /> 
                    </p:column>  

                </p:row>
                <p:row>  
                    <p:column colspan="6">
                        <p:inputTextarea value="#{filter.selectedFilter.regexp}" />
                    </p:column>  


                </p:row> 

                

                
             </p:panelGrid> 
 <!--                       
                        <h:panelGrid id="display" columns="1" cellpadding="4">
                            <h:panelGrid id="displayHeader" columns="3" cellpadding="16">  

                                <f:facet name="header"> 
                                </f:facet>

                                <h:outputText value="Name:" /> 
                                <p:inputText value="#{filter.selectedFilter.name}" readonly="true" label="Name:" />
                                <h:outputText value="#{filter.selectedFilter.name}" />
                                <h:outputText value="Aggression:" />  
                                <h:outputText value="#{filter.selectedFilter.aggression}" /> 
                                <h:outputText value="Type:" />  
                                <h:outputText value="#{filter.selectedFilter.filterType}" /> 

                            </h:panelGrid>
                            <h:panelGrid id="displayBody" columns="2" cellpadding="4">     




                                <h:outputText value="Scope:" />  
                                <h:outputText value="#{filter.selectedFilter.scope}" />  
                            </h:panelGrid> 
                        </h:panelGrid>
 -->
                    </p:dialog>
    </h:body>
</html>
And the 2nd is the left-hand side menu - the Users option launches the xhtml in question.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>


    </h:head>

    <h:body>        
        <ui:composition>
            <ui:define name="mainMenu" />
            
            <h:form>
                <p:menu style="width:280px">
                    <p:submenu label="Dashboard">  
                        <p:menuitem value="Add dashlet" actionListener="#{buttonBean.save}" update="" icon="ui-icon ui-icon-disk"/>  
                        <p:menuitem value="Delete dashlet" actionListener="#{buttonBean.update}" update="" icon="ui-icon ui-icon-arrowrefresh-1-w"/>  
                    </p:submenu>
                    <p:submenu label="Configuration">
                        <p:menuitem value="Global" actionListener="#{buttonBean.save}" update="" icon="ui-icon ui-icon-disk"/>                        
                        <p:menuitem value="Portals" actionListener="#{buttonBean.update}" update="" icon="ui-icon ui-icon-arrowrefresh-1-w"/>  
                    </p:submenu> 
                    <p:submenu label="User Management">                       
                        <p:menuitem value="Groups" url="groups.jsf" update="" icon="ui-icon ui-icon-disk"/> 
                        <p:menuitem value="Users" url="users.jsf" update="" icon="ui-icon ui-icon-disk"/>
                    </p:submenu>
                    <p:submenu label="Routing / Filtering">  
                        <p:menuitem value="Filters" url="filters.jsf" update="" icon="ui-icon ui-icon-close"/>
                        <p:menuitem value="Whitelist" url="whitelist.jsf" icon="ui-icon ui-icon-close"/>                        
                    </p:submenu>
                    <p:submenu label="Quarantine">  
                        <p:menuitem value="Quarantine" url="quarantine.jsf" update="" icon="ui-icon ui-icon-close"/>                        
                    </p:submenu>  
                    <p:submenu label="Reports / Charts">  
                        <p:menuitem value="Reports" url="http://www.primefaces.org" icon="ui-icon ui-icon-home"/>  
                        <p:menuitem value="Charts" url="#{request.contextPath}/touch" icon="ui-icon ui-icon-star"/>  
                    </p:submenu>  
                </p:menu>
                
            </h:form>
        </ui:composition>

    </h:body>
</html>
Oh and there's the bean for users:

Code: Select all

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jak.EMP.empui;

import com.jak.EMP.dao.EMP_DAO;
import com.jak.EMP.dao.Empuser;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

/**
 *
 * @author john
 */

@ManagedBean(name = "user")
@ViewScoped
public class UserBean {
    
    List<Empuser> userList = null;
    private Empuser[] selectedUsers;
    private EMP_DAO dao;
    private Empuser selectedUser;
    
    public UserBean() {
        dao = new EMP_DAO();
    }
    
    /* Empuser types in com.pop3gateway.Empuser
        static public final int ALL = -1;
        static public final int SYSTEM_OVERRIDE = 0;
        static public final int USER_OVERRIDE = 1;
        static public final int SYSTEM_BLOCKING = 2;
        static public final int USER_BLOCKING = 3;
     */
    
    public List<Empuser> getUserList() {
        userList = dao.getAllUsers();
        return userList;
    }
    
    public void setUserList(List<Empuser> userList) {
        this.userList = userList;
    }
    
    public Empuser getSelectedUser() {  
        return selectedUser;  
    }  
  
    public void setSelectedUser(Empuser selectedUser) {  
        this.selectedUser = selectedUser;  
    } 
    public Empuser[] getSelectedUsers() {  
        return selectedUsers;  
    }  
  
    public void setSelectedUser(Empuser[] selectedUsers) {  
        this.selectedUsers = selectedUsers;  
    }
    
}
Primefaces: 4.0
Primefaces-extensions: 1.1.0
JSF: 2.2

Glassfish 4
Netbeans 7.3

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

06 Sep 2012, 20:56

By the way, guys, where did you find released Mojarra 2.1.13?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

jakorsme
Posts: 58
Joined: 10 Dec 2010, 02:43

06 Sep 2012, 21:52

I was on 11 not 13 - then I downgraded to 10 at your suggestion.
The other person here was also on primefaces 3.4 RC if I remember correctly - I never was on 3.4
Primefaces: 4.0
Primefaces-extensions: 1.1.0
JSF: 2.2

Glassfish 4
Netbeans 7.3

sreedharg
Posts: 8
Joined: 05 Apr 2012, 09:19

07 Sep 2012, 16:42

It finally worked @ 2.1.7
I have no issues using 3.4 RC1 and mojarra 2.1.7....

Regards
Sree

jakorsme
Posts: 58
Joined: 10 Dec 2010, 02:43

08 Sep 2012, 02:05

I tried JSF 2.1.7 with primefaces 3.3.1 and still get the exact same error.

I then later tried JSF 2.1.7 with primefaces 3.4 and still get the exact same error.
Primefaces: 4.0
Primefaces-extensions: 1.1.0
JSF: 2.2

Glassfish 4
Netbeans 7.3

clement
Posts: 25
Joined: 27 Feb 2014, 12:32

23 Mar 2017, 17:56

Hello,
I am relaunching this subject.
Has there been any corrections? I use Primefaces 6.0, Primefaces Extension 6.0.0 and Mojarra 2.2.13.
I have the problem described above, I have a component masterDetail and when I click twice on the same link of the breadcrumb i get the error: Cannot add the same component twice: datatable_name:j_id10.
Every 2 click I have the problem...

I have more informations, when i comment tag pe:selecDetalLevel it works... See below :

Code: Select all

<p:layout>
	<p:layoutUnit position="center">
        	<h:form>
                	<pe:masterDetail>
                		<pe:masterDetailLevel level="1"
                				levelLabel="classes">
		               		 <p:dataTable>
                				<p:column>
							<p:commandLink action="#{materialsCtlr.read(class)}"
						        		value="#{class.instancesCount}">
								<!--
						                	<pe:selectDetailLevel level="3"/>
						                -->
							</p:commandLink>
						</p:column>
					</p:dataTable>
				</pe:masterDetailLevel>
			</pe:masterDetail>				
		</h:form>
	</p:layoutUnit>
</p:layout>
full trace :
javax.faces.FacesException: Cannot add the same component twice: datatable_name:0:j_id10 at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:748) at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAdd(StateContext.java:675) at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:347) at com.sun.faces.context.StateContext$DynamicAddRemoveListener.processEvent(StateContext.java:565) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118) at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2218) at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2036) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:290) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:245) at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2254) at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1935) at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:448) at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2700) at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2672) at org.primefaces.extensions.component.masterdetail.PreRenderSourceListener.addUIParameter(PreRenderSourceListener.java:178) at org.primefaces.extensions.component.masterdetail.PreRenderSourceListener.processEvent(PreRenderSourceListener.java:69) at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2584) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118) at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169) at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2114) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:287) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:245) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:857) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854) at org.primefaces.component.column.Column.renderChildren(Column.java:352) at org.primefaces.component.datatable.DataTableRenderer.encodeCell(DataTableRenderer.java:1051) at org.primefaces.component.datatable.DataTableRenderer.encodeRow(DataTableRenderer.java:999) at org.primefaces.component.datatable.DataTableRenderer.encodeRows(DataTableRenderer.java:907) at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:854) at org.primefaces.component.datatable.DataTableRenderer.encodeScrollBody(DataTableRenderer.java:408) at org.primefaces.component.datatable.DataTableRenderer.encodeScrollableTable(DataTableRenderer.java:355) at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:249) at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:87) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) at org.primefaces.extensions.component.masterdetail.MasterDetailRenderer.encodeMarkup(MasterDetailRenderer.java:168) at org.primefaces.extensions.component.masterdetail.MasterDetailRenderer.encodeEnd(MasterDetailRenderer.java:101) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863) at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:582) at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIForm.visitTree(UIForm.java:362) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700) at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403) at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:322) at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57) at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:432) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:78) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at com.cadwin.rcsdm.tdp.session.SessionFilter.doFilter(SessionFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) at java.lang.Thread.run(Thread.java:745)
--
Clément

Primefaces 6.0
Primefaces Extension 6.0.0
JSF 2.2.13
JBoss 7.1.3

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests