ICEfaces
  1. ICEfaces
  2. ICE-7687

Add ability to avoid having the ice:gmap JavaScript load on every page when not using it.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 3.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 3, ice:gmap component
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      Currently, the Google gmap bootstrap JavaScript used by the ice:gmap component must be loaded into the <head> region of the page when the page loads. Due to technical limitations with JSF partial-page updates not being able to update the HEAD region we preload the Javascript into the head on every full page GET so that it is there should the ice:gmap component be added to the page later via a partial-page update.

      However, this preloading is not efficient as it causes the gmap JavaScript to be loaded and evaluated each time a page is loaded, even if the component is not being used on that page. This JIRA is to add a mechanism (config. param?) that would allow the application to opt. out of the gmap Javascript preload if that component is not being used.

      A similar issue was recently resolved for ice:inputRichText via ICE-7293.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27467 Fri Jan 27 15:41:17 MST 2012 ken.fyten ICE-7687 Disable Google Maps code loading when key not provided.
          Files Changed
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapResourceHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27445 Fri Jan 27 12:24:54 MST 2012 mircea.toma ICE-7687 Diable Google Maps code loading when key not provided.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapResourceHandler.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27426 Thu Jan 26 17:46:19 MST 2012 ken.fyten ICE-7687 Annotated GMapRenderer as mandatory resource. Moved ExternalScript annotation to the component and changed its processing to be executed with the rest of mandatory resource dependencies. Renamed ExternalScript to ExternalResourceDependency. Updated component-showcase web.xml to include GMap component in the list of mandatoryResourceConfiguration parameter. Changed strategy used to insert Google Maps script code into the 'head'. Created dummy/empty gmap.js resource and referenced by GMap component. Introduced GMapResourceHandler which replaces dynamically gmap.js' request URL with the URL pointing to Google code.
          Files Changed
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/compat/component-metadata/src/main/resources/com/icesoft/jsfmeta/templates/jsf11/resources/faces-config-rt.ftl
          Commit graph ADD /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapResourceHandler.java
          Commit graph DEL /icefaces3/tags/icefaces-3.0.0/icefaces/core/src/main/java/org/icefaces/render/ExternalScript.java
          Commit graph ADD /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/resources/META-INF/resources/gmap
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapRenderer.java
          Commit graph ADD /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/resources/META-INF/resources/gmap/gmap.js
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMap.java
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/samples/compat/component-showcase/src/main/webapp/WEB-INF/web.xml
          Commit graph MODIFY /icefaces3/tags/icefaces-3.0.0/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27419 Thu Jan 26 15:08:43 MST 2012 mircea.toma ICE-7687 Changed strategy used to insert Google Maps script code into the 'head'. Created dummy/empty gmap.js resource and referenced by GMap component. Introduced GMapResourceHandler which replaces dynamically gmap.js' request URL with the URL pointing to Google code.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph ADD /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapResourceHandler.java
          Commit graph ADD /icefaces3/trunk/icefaces/compat/components/src/main/resources/META-INF/resources/gmap
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/component-metadata/src/main/resources/com/icesoft/jsfmeta/templates/jsf11/resources/faces-config-rt.ftl
          Commit graph DEL /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/render/ExternalResourceDependency.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMap.java
          Commit graph ADD /icefaces3/trunk/icefaces/compat/components/src/main/resources/META-INF/resources/gmap/gmap.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27403 Thu Jan 26 09:06:55 MST 2012 mircea.toma ICE-7687 Remove usage of addCustomScripts method.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #27402 Thu Jan 26 08:46:28 MST 2012 mircea.toma ICE-7687 Annotated GMapRenderer as mandatory resource. Moved ExternalScript annotation to the component and changed its processing to be executed with the rest of mandatory resource dependencies. Renamed ExternalScript to ExternalResourceDependency. Updated component-showcase web.xml to include GMap component in the list of mandatoryResourceConfiguration parameter.
          Files Changed
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapRenderer.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/samples/compat/component-showcase/src/main/webapp/WEB-INF/web.xml
          Commit graph DEL /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/render/ExternalScript.java
          Commit graph ADD /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/render/ExternalResourceDependency.java
          Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMap.java

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: