ICEfaces
  1. ICEfaces
  2. ICE-6047

Automatic loading of external scripts

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta1
    • Fix Version/s: 2.0-Beta2, 2.0.0
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2.0, Google maps

      Description

      As described in ICE-5211, it can be difficult to integrate components that require external scripts, such as

      http://maps.google.com/maps/api/js?sensor=false

      Evidence indicates that these external scripts must be loaded on initial page GET, so the best solution is to have the script loading as part of the page template.

      This can be implemented as an externalScript resource component automatically added to the HEAD resources, similar to bridge.js. The externalScript component should automatically detect any other components in the application that require external scripts. This can be done through a context parameter or an <ice:config> parameter. Additionally, it may be desirable to specify a script link to be loaded directly in web.xml (not associated with any particular component.)

      It is possible that <ice:config> will not run at the right time to ensure that the JavaScript is loaded when required.
       

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22633 Thu Oct 14 15:18:29 MDT 2010 ted.goddard set ID on ExternalScript renderer to avoid head id (ICE-6047)
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/gmap/GMapRenderer.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Commit graph MODIFY /icefaces2/trunk/icefaces/compat/samples/component-showcase/web/WEB-INF/includes/templates/page-template.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22576 Fri Oct 08 08:55:00 MDT 2010 greg.dick ICE-6047 gMap key test is just for presence, it isn't a boolean flag enabling the functionality.
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22575 Fri Oct 08 08:45:38 MDT 2010 greg.dick ICE-6047 Set the renderer transient
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22525 Tue Oct 05 22:38:18 MDT 2010 greg.dick ICE-6047 repaired logic that was checking existence of contextParam
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22524 Tue Oct 05 16:39:21 MDT 2010 greg.dick ICE-6047 Added Annotation for external script reference for testing
          Files Changed
          Commit graph MODIFY /icefaces/scratchpads/sparkle/component/src/org/icefaces/component/commandlink/CommandLinkRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22523 Tue Oct 05 16:38:48 MDT 2010 greg.dick ICE-6047 Added support for optional scripts to head region
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/DOMRenderKit.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22522 Tue Oct 05 16:37:28 MDT 2010 greg.dick ICE-6047 Added support for optional scripts to head region
          Files Changed
          Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #22521 Tue Oct 05 16:36:20 MDT 2010 greg.dick ICE-6047 Initial check in
          Files Changed
          Commit graph ADD /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/render/ExternalScript.java

            People

            • Assignee:
              Greg Dick
              Reporter:
              Ted Goddard
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: