ICEfaces
  1. ICEfaces
  2. ICE-8942

showcase - ace:GMap Controls JS error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2, EE-3.2.0.GA
    • Fix Version/s: EE-3.2.0.GA, 3.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEfaces-EE-3.2.0.GA Build 8 / 9 (using Mojarra or MyFaces JSF)
      App server: WebLogic 10.3.0 @ lnvm1; WebSphere 7.0.0.5; Tomcat 7.0.27
      Browsers: IE8, FF18
    • Assignee Priority:
      P1

      Description

      GMap - Controls: a JS error occurs in FF18/IE8 when checking the control check boxes (started clicking in the check boxes, this occurred when clicking in the 'Overview Control' check box in FF18, and when clicking the 'Pan' check box in IE8):


      FF18:
      SyntaxError: syntax error
      http://lnvm1.icesoft.domain:7001/showcase/javax.faces.resource/icefaces-compat.js.jsf?ln=ice.compat&v=3_2_0_130129
      Line 8

      IE8:
      Webpage error details
      User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; .NET4.0C)
      Timestamp: Wed, 30 Jan 2013 23:00:35 UTC

      Message: Syntax error
      Line: 356361537
      Char: 115
      Code: 0
      URI: http://lnvm1.icesoft.domain:7001/showcase/showcase.jsf?grp=aceMenu&exp=mapBean

        Activity

        Hide
        Ken Fyten added a comment -

        Please test the ACE regression tests for ace:gMap on one of these servers to determine if this issue is specific to EL or something that the showcase sample is using, and not an actual issue with the gmap component itself.

        Show
        Ken Fyten added a comment - Please test the ACE regression tests for ace:gMap on one of these servers to determine if this issue is specific to EL or something that the showcase sample is using, and not an actual issue with the gmap component itself.
        Hide
        Carmen Cristurean added a comment -

        Tested the ACE regressions tests for ace:gMap on WebSphere7.0.0.5 @ lnvm2 using gMap.war built w/MyFaces on ICEfaces-EE Build10, and could not reproduce the JS error from description of this JIRA, however other errors occurred:

        ace:gMap dynamic attribute test:

        1) Interacting with the page -> JS error(FF18):

        invalid object initializer
        http://lnvm2.icesoft.domain:9081/gMap/javax.faces.resource/jsf.js.jsf?ln=javax.faces
        Line 1

        2) Clicking 'rendered' check box triggers a Server Internal Error popup.
        Server errors:

        [1/22/13 14:00:39:396 MST] 000000d0 SystemErr R org.apache.myfaces.view.facelets.el.ContextAwareELException: javax.el.ELException: Can't set property 'zoomLevel' on class 'org.icefaces.gMap.AttributeBean' to value '5'.
        [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:166)
        [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapBase.setZoomLevel(GMapBase.java:444)
        [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapRenderer.updateValues(GMapRenderer.java:118)
        [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapRenderer.encodeBegin(GMapRenderer.java:52)
        [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:587)
        ...............
        [1/22/13 14:00:39:401 MST] 000000d0 SystemErr R Caused by: javax.el.ELException: Can't set property 'zoomLevel' on class 'org.icefaces.gMap.AttributeBean' to value '5'.
        [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at javax.el.BeanELResolver.setValue(BeanELResolver.java:366)
        [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283)
        [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:237)
        (ContextAwareTagValueExpression.java:153)
        [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R ... 34 more
        [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R Caused by: java.lang.IllegalArgumentException: argument type mismatch
        [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at java.lang.reflect.Method.invoke(Method.java:599)
        [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at javax.el.BeanELResolver.setValue(BeanELResolver.java:352)

        Show
        Carmen Cristurean added a comment - Tested the ACE regressions tests for ace:gMap on WebSphere7.0.0.5 @ lnvm2 using gMap.war built w/MyFaces on ICEfaces-EE Build10, and could not reproduce the JS error from description of this JIRA, however other errors occurred: ace:gMap dynamic attribute test: 1) Interacting with the page -> JS error(FF18): invalid object initializer http://lnvm2.icesoft.domain:9081/gMap/javax.faces.resource/jsf.js.jsf?ln=javax.faces Line 1 2) Clicking 'rendered' check box triggers a Server Internal Error popup. Server errors: [1/22/13 14:00:39:396 MST] 000000d0 SystemErr R org.apache.myfaces.view.facelets.el.ContextAwareELException: javax.el.ELException: Can't set property 'zoomLevel' on class 'org.icefaces.gMap.AttributeBean' to value '5'. [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.setValue(ContextAwareTagValueExpression.java:166) [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapBase.setZoomLevel(GMapBase.java:444) [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapRenderer.updateValues(GMapRenderer.java:118) [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at org.icefaces.ace.component.gmap.GMapRenderer.encodeBegin(GMapRenderer.java:52) [1/22/13 14:00:39:397 MST] 000000d0 SystemErr R at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:587) ............... [1/22/13 14:00:39:401 MST] 000000d0 SystemErr R Caused by: javax.el.ELException: Can't set property 'zoomLevel' on class 'org.icefaces.gMap.AttributeBean' to value '5'. [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at javax.el.BeanELResolver.setValue(BeanELResolver.java:366) [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at javax.el.CompositeELResolver.setValue(CompositeELResolver.java:283) [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.setValue(FacesCompositeELResolver.java:237) (ContextAwareTagValueExpression.java:153) [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R ... 34 more [1/22/13 14:00:39:402 MST] 000000d0 SystemErr R Caused by: java.lang.IllegalArgumentException: argument type mismatch [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45) [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at java.lang.reflect.Method.invoke(Method.java:599) [1/22/13 14:00:39:403 MST] 000000d0 SystemErr R at javax.el.BeanELResolver.setValue(BeanELResolver.java:352)
        Hide
        Jerome Ruzol added a comment - - edited

        Manually Tested the ACE regressions tests ace:gMap on Tomcat 7.0.27 using gMap.war built w/MyFaces on ICEfaces-EE Build10, able to reproduce the above errors on the following pages:

        gMap Dynamic Attribute, MapMarker Dynamic Attribute

        • To reproduce, enter address, longitude and/or latitude on input textbox and press enter button to render location on gMap

        inside ice:PanelTabSet, inside ace:tabSet, inside clientSide ace:tabSet

        • To reproduce, enter start and end address and press 'Enter' button the three times (occurs the third time the enter button has been pressed).

        Below is a sample of the JS error produced:
        Webpage error details

        User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
        Timestamp: Thu, 31 Jan 2013 20:40:13 UTC

        Message: Syntax error
        Line: 1
        Char: 112
        Code: 0
        URI: http://10.18.39.126:8080/gMap/gMapDynMarkers.jsf

        Message: Syntax error
        Line: 1
        Char: 112
        Code: 0
        URI: http://10.18.39.126:8080/gMap/gMapDynMarkers.jsf

        Show
        Jerome Ruzol added a comment - - edited Manually Tested the ACE regressions tests ace:gMap on Tomcat 7.0.27 using gMap.war built w/MyFaces on ICEfaces-EE Build10, able to reproduce the above errors on the following pages: gMap Dynamic Attribute, MapMarker Dynamic Attribute To reproduce, enter address, longitude and/or latitude on input textbox and press enter button to render location on gMap inside ice:PanelTabSet, inside ace:tabSet, inside clientSide ace:tabSet To reproduce, enter start and end address and press 'Enter' button the three times (occurs the third time the enter button has been pressed). Below is a sample of the JS error produced: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E) Timestamp: Thu, 31 Jan 2013 20:40:13 UTC Message: Syntax error Line: 1 Char: 112 Code: 0 URI: http://10.18.39.126:8080/gMap/gMapDynMarkers.jsf Message: Syntax error Line: 1 Char: 112 Code: 0 URI: http://10.18.39.126:8080/gMap/gMapDynMarkers.jsf
        Hide
        Carmen Cristurean added a comment - - edited

        Re-tested ace:gMap on WAS7, and could reproduce the JS error in FF18 on 'ace:gMapLayer dynamic attribute test' page:
        I had to change the values in the drop-downs and enter different strings in the 'options' text entry a few times to get this error in the error console.

        There are no javax.el.ELExceptions in the server log when this JS error happens, only this warning is seen:
        [1/22/13 15:17:51:491 MST] 000000c6 srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setIntHeader WARNING: Cannot set header. Response already committed.

        Show
        Carmen Cristurean added a comment - - edited Re-tested ace:gMap on WAS7, and could reproduce the JS error in FF18 on 'ace:gMapLayer dynamic attribute test' page: I had to change the values in the drop-downs and enter different strings in the 'options' text entry a few times to get this error in the error console. There are no javax.el.ELExceptions in the server log when this JS error happens, only this warning is seen: [1/22/13 15:17:51:491 MST] 000000c6 srt W com.ibm.ws.webcontainer.srt.SRTServletResponse setIntHeader WARNING: Cannot set header. Response already committed.
        Hide
        Arturo Zambrano added a comment - - edited

        Committed fix to the 3.2 EE tag at revision 33318, and to the trunk at revision 33319.

        The problem was caused by rendering the instantiation of a new LatLng object without arguments (like this "new google.maps.LatLng(,)"), so this syntax error was reported by the browser. This situation arised after an improvement to update the backing bean values when directly interacting with the map itself (as opposed to using separate input components), which was motivated by this forum post:
        http://www.icesoft.org/JForum/posts/list/21335.page#75013

        The initial implementation wasn't checking for empty strings when updating the different properties of the map. It was also incorrectly comparing old values to new values. This commit fixed those issues, but revealed that this capability needs to be further improved or redesigned, since there might be conflicts when trying to update the different map properties (latitude, longitude, zoom level, and map type) by both the map itself and separate input components/controls. The only problem at the moment is that in certain circumstances the values of the separate input components might not be updated (to match the state of the map) at the first submit but would require a second request.

        Show
        Arturo Zambrano added a comment - - edited Committed fix to the 3.2 EE tag at revision 33318, and to the trunk at revision 33319. The problem was caused by rendering the instantiation of a new LatLng object without arguments (like this "new google.maps.LatLng(,)"), so this syntax error was reported by the browser. This situation arised after an improvement to update the backing bean values when directly interacting with the map itself (as opposed to using separate input components), which was motivated by this forum post: http://www.icesoft.org/JForum/posts/list/21335.page#75013 The initial implementation wasn't checking for empty strings when updating the different properties of the map. It was also incorrectly comparing old values to new values. This commit fixed those issues, but revealed that this capability needs to be further improved or redesigned, since there might be conflicts when trying to update the different map properties (latitude, longitude, zoom level, and map type) by both the map itself and separate input components/controls. The only problem at the moment is that in certain circumstances the values of the separate input components might not be updated (to match the state of the map) at the first submit but would require a second request.
        Hide
        Cruz Miraback added a comment -

        Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on WebLogic10 in Firefox18, IE8.

        Show
        Cruz Miraback added a comment - Confirmed fixed using ICEfaces EE 3.2.0.GA.Build13 on WebLogic10 in Firefox18, IE8.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Carmen Cristurean
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: