ICEfaces
  1. ICEfaces
  2. ICE-7952

The DataTable examples with component bindings throw duplicate id exception when running on MyFaces (was: The DataTable Row State example throws duplicate id exception when running as a portlet with MyFaces)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, EE-3.0.0.GA, 3.1.0.BETA1
    • Fix Version/s: 3.2
    • Labels:
      None
    • Environment:
      ICEfaces 3 ACE Liferay portlet MyFaces
    • Assignee Priority:
      P1
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Set the following context parameter to prevent MyFaces from checking for duplicates:


          <context-param>
              <param-name>org.apache.myfaces.CHECK_ID_PRODUCTION_MODE</param-name>
              <param-value>false</param-value>
          </context-param>
      Show
      Set the following context parameter to prevent MyFaces from checking for duplicates:     <context-param>         <param-name>org.apache.myfaces.CHECK_ID_PRODUCTION_MODE</param-name>         <param-value>false</param-value>     </context-param>

      Description

      When testing the DataTable Row State demo on Liferay 6 with MyFaces, I was able to get it to fail with a duplicate ID exception. Other Data Table examples also show this behaviour but I haven't test them all. It can be done in a couple of different ways:

        Activity

        Hide
        Nils Lundquist added a comment - - edited

        I'll just revise these cases to find the component instance using VisitTree.

        Show
        Nils Lundquist added a comment - - edited I'll just revise these cases to find the component instance using VisitTree.
        Hide
        Nils Lundquist added a comment - - edited

        Revision #31485
        Committed by nils.lundquist
        Moments ago
        ICE-7952 - Fix MyFaces compatibility. ace:dataTable showcase example now access component binding via RequestScoped bean.
        It was also required that each example also had a unique request scoped component binding. The titular error was caused when navigating between examples and a RequestScoped binding was shared. I suppose this is because the same reference is used at state load and rendering, despite actually being different components.

        Show
        Nils Lundquist added a comment - - edited Revision #31485 Committed by nils.lundquist Moments ago ICE-7952 - Fix MyFaces compatibility. ace:dataTable showcase example now access component binding via RequestScoped bean. It was also required that each example also had a unique request scoped component binding. The titular error was caused when navigating between examples and a RequestScoped binding was shared. I suppose this is because the same reference is used at state load and rendering, despite actually being different components.
        Hide
        Carmen Cristurean added a comment - - edited

        Reopening (as requested by Ken), due to this showcase - dataTable regression (trunk rev# 31487/ 31497):
        DataTable - Find: search not functional, and NullPointerException in tomcat log when searching (using any search type or search query string):
        SEVERE: JSF1073: javax.faces.event.AbortProcessingException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=form:findNext, Message=/resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="#

        {aceDataTableFind.find}": java.lang.NullPointerException
        16-Oct-2012 8:47:15 AM com.sun.faces.context.AjaxExceptionHandlerImpl log
        SEVERE: /resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="#{aceDataTableFind.find}

        ": java.lang.NullPointerException
        javax.faces.event.AbortProcessingException: /resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="#

        {aceDataTableFind.find}

        ": java.lang.NullPointerException
        at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:182)
        at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
        at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769)
        ......
        Caused by: java.lang.NullPointerException
        at org.icefaces.samples.showcase.example.ace.dataTable.DataTableFind.find(DataTableFind.java:116)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:264)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148)
        ... 25 more

        Show
        Carmen Cristurean added a comment - - edited Reopening (as requested by Ken), due to this showcase - dataTable regression (trunk rev# 31487/ 31497): DataTable - Find: search not functional, and NullPointerException in tomcat log when searching (using any search type or search query string): SEVERE: JSF1073: javax.faces.event.AbortProcessingException caught during processing of INVOKE_APPLICATION 5 : UIComponent-ClientId=form:findNext, Message=/resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="# {aceDataTableFind.find}": java.lang.NullPointerException 16-Oct-2012 8:47:15 AM com.sun.faces.context.AjaxExceptionHandlerImpl log SEVERE: /resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="#{aceDataTableFind.find} ": java.lang.NullPointerException javax.faces.event.AbortProcessingException: /resources/examples/ace/dataTable/dataTableFind.xhtml @63,147 actionListener="# {aceDataTableFind.find} ": java.lang.NullPointerException at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:182) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:769) ...... Caused by: java.lang.NullPointerException at org.icefaces.samples.showcase.example.ace.dataTable.DataTableFind.find(DataTableFind.java:116) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.el.parser.AstValue.invoke(AstValue.java:264) at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148) ... 25 more
        Hide
        Carmen Cristurean added a comment - - edited

        Re-tested showcase - dataTable - Find / verified fix with trunk rev. 31504 in Firefox14.

        Show
        Carmen Cristurean added a comment - - edited Re-tested showcase - dataTable - Find / verified fix with trunk rev. 31504 in Firefox14.
        Hide
        Nils Lundquist added a comment -

        Adding resolution missed by migration.

        Show
        Nils Lundquist added a comment - Adding resolution missed by migration.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: