ICEfaces
  1. ICEfaces
  2. ICE-10968

Unable to pick date with ace:dateTimeEntry on Pluto

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.1
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Apache Pluto
    • Assignee Priority:
      P1

      Description

      - Start Apache Pluto 2.0.2 and navigate to http://localhost:8080/pluto/portal

      - Username: pluto

      - Password: pluto

      - Copy the attached icefaces4-portlet-4.0.0-SNAPSHOT.war artifact to the tomcat/webapps folder

      - Using the Pluto Admin page, add a new page named "ICE4" and then add the "ICEfaces4" portlet to it.

      - Navigate to the new ICE4 page

      - Click in the "Date of Birth" field at try to select a date from the popup calendar

      If the bug is fixed then the date will be selected and appear in the textbox.

      Otherwise, if the bug still exists then there will be an error in the browser's console log:
      Uncaught TypeError: Cannot read property 'length' of undefined
      http://localhost:8080/pluto/portal/ICE4/__rsicefaces4-portlet-40x200x20-SNAPSHOT0x21!2241321%7C0?ln=ice.core&javax.faces.resource=bridge.js

        Activity

        Neil Griffin created issue -
        Neil Griffin made changes -
        Field Original Value New Value
        Attachment icefaces4-portlet-4.0.0-SNAPSHOT.war [ 22085 ]
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ]
        Fix Version/s 4.1.1 [ 12972 ]
        Affects Version/s 4.1.1 [ 12972 ]
        Assignee Priority P1 [ 10010 ]
        Component/s ACE-Components [ 10050 ]
        Hide
        Arturo Zambrano added a comment -

        I haven't been able to successfully deploy the attached portlet on Apache Pluto 2.0.2. I'm able to add the portlet to a page, but when I try to view the page I get this exception, displayed right on the browser:

        Error rendering portlet 1.
        javax.portlet.faces.BridgeException: javax.faces.FacesException: Expression Error: Named Object: com.liferay.faces.portlet.component.renderurl.RenderURL not found.
        	at com.liferay.faces.bridge.internal.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:105)
        	at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:131)
        	at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:263)
        	at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:348)
        	at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:212)
        	at javax.portlet.GenericPortlet.render(GenericPortlet.java:253)
        	at org.apache.pluto.driver.services.container.FilterChainImpl.doFilter(FilterChainImpl.java:163)
        	at org.apache.pluto.driver.services.container.FilterChainImpl.processFilter(FilterChainImpl.java:91)
        	at org.apache.pluto.driver.services.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:105)
        	at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340)
        	at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261)
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        	...
        

        I tried to simplify the portlet to make it only display the dateTimeEntry component, but I keep getting the same exception.

        I followed the steps exactly as they appear in the description. Am I missing a step or do I need to add a library or something else to Pluto?

        Show
        Arturo Zambrano added a comment - I haven't been able to successfully deploy the attached portlet on Apache Pluto 2.0.2. I'm able to add the portlet to a page, but when I try to view the page I get this exception, displayed right on the browser: Error rendering portlet 1. javax.portlet.faces.BridgeException: javax.faces.FacesException: Expression Error: Named Object: com.liferay.faces.portlet.component.renderurl.RenderURL not found. at com.liferay.faces.bridge.internal.BridgePhaseRenderImpl.execute(BridgePhaseRenderImpl.java:105) at com.liferay.faces.bridge.internal.BridgeImpl.doFacesRequest(BridgeImpl.java:131) at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:263) at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:348) at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:212) at javax.portlet.GenericPortlet.render(GenericPortlet.java:253) at org.apache.pluto.driver.services.container.FilterChainImpl.doFilter(FilterChainImpl.java:163) at org.apache.pluto.driver.services.container.FilterChainImpl.processFilter(FilterChainImpl.java:91) at org.apache.pluto.driver.services.container.FilterManagerImpl.processFilter(FilterManagerImpl.java:105) at org.apache.pluto.container.driver.PortletServlet.dispatch(PortletServlet.java:340) at org.apache.pluto.container.driver.PortletServlet.doGet(PortletServlet.java:261) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) ... I tried to simplify the portlet to make it only display the dateTimeEntry component, but I keep getting the same exception. I followed the steps exactly as they appear in the description. Am I missing a step or do I need to add a library or something else to Pluto?
        Neil Griffin made changes -
        Comment [ @Arturo Zambrano: Please check email for the Pluto+Tomcat bundle. ]
        Neil Griffin made changes -
        Comment [ The version of Tomcat that comes with Pluto 2.0.2 is not able to handle JSF 2.2. I will provide you with an updated Pluto+Tomcat bundle. Standby... ]
        Hide
        Arturo Zambrano added a comment -

        After being able to test the portlet, this seems to be a more general issue with the bridge. The same javascript error occurs when entering text in the other text fields in the form, such as 'First Name', and then tabbing out.

        I traced the error, and it occurs at the fixAlreadyNamespacedOptions() function, called from the fullSubmit() function. The error occurs when trying to get the length of the 'parameterPrefix' argument, which is undefined on Pluto, whereas, on Liferay, it's an empty string.

        Perhaps, this could be fixed by modifying the first line of fixAlreadyNamespacedOptions() from...

        var length = parameterPrefix.length;
        

        to...

        var length = parameterPrefix ? parameterPrefix.length : 0;
        
        Show
        Arturo Zambrano added a comment - After being able to test the portlet, this seems to be a more general issue with the bridge. The same javascript error occurs when entering text in the other text fields in the form, such as 'First Name', and then tabbing out. I traced the error, and it occurs at the fixAlreadyNamespacedOptions() function, called from the fullSubmit() function. The error occurs when trying to get the length of the 'parameterPrefix' argument, which is undefined on Pluto, whereas, on Liferay, it's an empty string. Perhaps, this could be fixed by modifying the first line of fixAlreadyNamespacedOptions() from... var length = parameterPrefix.length; to... var length = parameterPrefix ? parameterPrefix.length : 0;
        Hide
        Arturo Zambrano added a comment -

        ...or maybe this new line should be inserted first, since parameterPrefix is used later on

        parameterPrefix = typeof parameterPrefix != 'undefined' ? parameterPrefix : '';
        
        Show
        Arturo Zambrano added a comment - ...or maybe this new line should be inserted first, since parameterPrefix is used later on parameterPrefix = typeof parameterPrefix != 'undefined' ? parameterPrefix : '';
        Ken Fyten made changes -
        Assignee Arturo Zambrano [ artzambrano ] Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment - - edited

        The javascript error is not the real problem. In the page markup the inline script responsible for setting up the ICEfaces bridge is not rendered. The 'parameterPrefix' is one of the parameter that is defined in setup configuration.
        The following element should have an inline script element as child:

        <span id="Pluto_icefaces4_portlet_4_0_0_SNAPSHOT_1_3556498_0_:vv80fgyh1_icefaces_config"></span>
        
        Show
        Mircea Toma added a comment - - edited The javascript error is not the real problem. In the page markup the inline script responsible for setting up the ICEfaces bridge is not rendered. The 'parameterPrefix' is one of the parameter that is defined in setup configuration. The following element should have an inline script element as child: <span id= "Pluto_icefaces4_portlet_4_0_0_SNAPSHOT_1_3556498_0_:vv80fgyh1_icefaces_config" ></span>
        Hide
        Neil Griffin added a comment -

        When you get an opportunity, please let me know what part of the ICEfaces source code is responsible for rendering the <span>...</span> you mentioned.

        Show
        Neil Griffin added a comment - When you get an opportunity, please let me know what part of the ICEfaces source code is responsible for rendering the <span>...</span> you mentioned.
        Hide
        Mircea Toma added a comment - - edited

        org.icefaces.impl.event.BridgeSetup class, line 157.

        Show
        Mircea Toma added a comment - - edited org.icefaces.impl.event.BridgeSetup class, line 157.
        Hide
        Neil Griffin added a comment -

        Are you saying that the script is getting rendered in Liferay Portal but not in Pluto?

        Show
        Neil Griffin added a comment - Are you saying that the script is getting rendered in Liferay Portal but not in Pluto?
        Hide
        Mircea Toma added a comment - - edited

        No, Liferay will not render the script tag. But at least it renders its content in a different place:

        <div id="bottomJS">
            .....
        </div>
        <script type="text/javascript">
        .....ice.setupBridge("_1_WAR_icefaces4portlet_INSTANCE_vV75ldMObRSc_:vv20q4nh4_icefaces_config","v20q4nh4","jdiky5fkvu",{reloadOnUpdateFailure:!1,deltaSubmit:!1,focusManaged:!0,disableDefaultErrorPopups:!1,standardFormSerialization:!1,sendDisposeWindow:!1,blockUIOnSubmit:!1,clientSideElementUpdateDetermination:!1,parameterPrefix:""}); .......
        </script>
        
        Show
        Mircea Toma added a comment - - edited No, Liferay will not render the script tag. But at least it renders its content in a different place: <div id= "bottomJS" > ..... </div> <script type= "text/javascript" > .....ice.setupBridge( "_1_WAR_icefaces4portlet_INSTANCE_vV75ldMObRSc_:vv20q4nh4_icefaces_config" , "v20q4nh4" , "jdiky5fkvu" ,{reloadOnUpdateFailure:!1,deltaSubmit:!1,focusManaged:!0,disableDefaultErrorPopups:!1,standardFormSerialization:!1,sendDisposeWindow:!1,blockUIOnSubmit:!1,clientSideElementUpdateDetermination:!1,parameterPrefix:""}); ....... </script>
        Hide
        Neil Griffin added a comment -

        Is it OK that it Liferay renders it at the bottom of the page? That is a Liferay-only optimization that we have in the bridge. If it is not rendered at all in Pluto, then that means we have a bug in the bridge and this issue can be closed.

        Show
        Neil Griffin added a comment - Is it OK that it Liferay renders it at the bottom of the page? That is a Liferay-only optimization that we have in the bridge. If it is not rendered at all in Pluto, then that means we have a bug in the bridge and this issue can be closed.
        Hide
        Mircea Toma added a comment -

        Yes, it's fine if the script is rendered at the bottom of the page. I'll close the issue then.

        Show
        Mircea Toma added a comment - Yes, it's fine if the script is rendered at the bottom of the page. I'll close the issue then.
        Hide
        Mircea Toma added a comment -

        This is not an issue with ICEfaces. See above.

        Show
        Mircea Toma added a comment - This is not an issue with ICEfaces. See above.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Hide
        Kyle Stiemann added a comment -

        This issue is a bug in Liferay Faces. We have created FACES-2615 to track the issue, and I hope to commit a fix today.

        Show
        Kyle Stiemann added a comment - This issue is a bug in Liferay Faces. We have created FACES-2615 to track the issue, and I hope to commit a fix today.
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: