ICEfaces
  1. ICEfaces
  2. ICE-10285

Add configuration parameter for bridgeit.js source location

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: MOBI-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4.0
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      The MOBI native components rely on the bridgeit.js file and the bridgeit native app. to function. This means that each IF release will be certified using the current production release of each of these (e.g. v1.0.4). However, it is common for new mobile os releases to require tweaks to the bridgeit.js file. In order to accommodate this it must be possible for an icefaces release to discover and load a newer bridgeit.js file automatically once it becomes available. That way, ICEfaces 4.0, for example, can continue to function with newer bridgeit.js and bridgeit app versions as required without also requiring a newer ICEfaces release to do so.

      In order to enable the ICEfaces 4 MOBI native components to automatically load the latest production bridgeit.js javascript available each ICEfaces release will specify a default location to source the bridgeit.js from that it is compatible with. This location will be an alias to the latest production bridgeit.jsf release available for the major version specified (e.g.1.x, 2.x). Thus, the latest compatible bridgeit.js file of that major version will always be sourced from github.com by default.

      In addition, a new configuration parameter must be added to allow applications to specify an alternative location source for the bridgeit.js file. This is necessary to support the following use-cases:
      - Application browsers are not permitted to load JS from external servers. All application JS must be provided by the application's app. server itself.
      - An issue arises where a particular application needs to restrict itself to using a particular bridgeit.js version or file (perhaps a custom patched version, etc.).
       

        Issue Links

          Activity

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Description The MOBI native components rely on the bridgeit.js file and the bridgeit native app. to function. This means that each IF release will be certified using the current production release of each of these (e.g. v1.0.4). However, it is common for new mobile os releases to require tweaks to the bridgeit.js file. In order to accommodate this it must be possible for an icefaces release to discover and load a newer bridgeit.js file automatically once it becomes available. That way, ICEfaces 4.0, for example, can continue to function with newer bridgeit.js and bridgeit app versions as required without also requiring a newer ICEfaces release to do so.

          In order to enable the ICEfaces 4 MOBI native components to automatically load the latest production bridgeit.js javascript available each ICEfaces release will specify a default location to source the bridgeit.js from that it is compatible with. This location will be an alias to the latest production bridgeit.jsf release available for the major version specified (e.g.1.x, 2.x). Thus, the latest compatible bridgeit.js file will always be sourced from github.com by default.

          In addition, a new configuration parameter must be added to allow applications to specify an alternative location source for the bridgeit.js file. This is necessary to support the following use-cases:
          - Application browsers are not permitted to load JS from external servers. All application JS must be provided by the application's app. server itself.
          - An issue arises where a particular application needs to restrict itself to using a particular bridgeit.js version or file (perhaps a custom patched version, etc.).
           
          The MOBI native components rely on the bridgeit.js file and the bridgeit native app. to function. This means that each IF release will be certified using the current production release of each of these (e.g. v1.0.4). However, it is common for new mobile os releases to require tweaks to the bridgeit.js file. In order to accommodate this it must be possible for an icefaces release to discover and load a newer bridgeit.js file automatically once it becomes available. That way, ICEfaces 4.0, for example, can continue to function with newer bridgeit.js and bridgeit app versions as required without also requiring a newer ICEfaces release to do so.

          In order to enable the ICEfaces 4 MOBI native components to automatically load the latest production bridgeit.js javascript available each ICEfaces release will specify a default location to source the bridgeit.js from that it is compatible with. This location will be an alias to the latest production bridgeit.jsf release available for the major version specified (e.g.1.x, 2.x). Thus, the latest compatible bridgeit.js file of that major version will always be sourced from github.com by default.

          In addition, a new configuration parameter must be added to allow applications to specify an alternative location source for the bridgeit.js file. This is necessary to support the following use-cases:
          - Application browsers are not permitted to load JS from external servers. All application JS must be provided by the application's app. server itself.
          - An issue arises where a particular application needs to restrict itself to using a particular bridgeit.js version or file (perhaps a custom patched version, etc.).
           
          Ken Fyten made changes -
          Assignee Patrick Corless [ patrick.corless ]
          Fix Version/s 4.0 [ 11382 ]
          Affects Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ]
          Patrick Corless made changes -
          Assignee Patrick Corless [ patrick.corless ] Ken Fyten [ ken.fyten ]
          Hide
          Patrick Corless added a comment -

          The configuration parameter is for the the class org.icefaces.mobi.renderkit.BridgeItResourceHandler which currently has a hard coded path to the the bridgeit.js, http://bridgeit.github.io/bridgeit.js/src/bridgeit.js

          The class org.icefaces.util.EnvUtils should be updated with the folloign new paramater which can be used to set the location of the BridgeIt.js.

          public static String BRIDGE_IT_JAVASCRIPT_URI = "org.icefaces.mobi.bridgeit.javaScriptURI";

          The ideal result would be to for the BridgeItResourceHandler to be able to handle JavaScript found Jars, URL and via file path.

          Show
          Patrick Corless added a comment - The configuration parameter is for the the class org.icefaces.mobi.renderkit.BridgeItResourceHandler which currently has a hard coded path to the the bridgeit.js, http://bridgeit.github.io/bridgeit.js/src/bridgeit.js The class org.icefaces.util.EnvUtils should be updated with the folloign new paramater which can be used to set the location of the BridgeIt.js. public static String BRIDGE_IT_JAVASCRIPT_URI = "org.icefaces.mobi.bridgeit.javaScriptURI"; The ideal result would be to for the BridgeItResourceHandler to be able to handle JavaScript found Jars, URL and via file path.
          Hide
          Ken Fyten added a comment -

          FYI: The following files are now on api.bridgeit.mobi:

          But currently there do not seem to be any CORS headers being set on those requests.

          Show
          Ken Fyten added a comment - FYI: The following files are now on api.bridgeit.mobi: http://api.bridgeit.mobi/bridgeit/v1.0.4/bridgeit.js http://api.bridgeit.mobi/bridgeit/v1.x-latest/bridgeit.js But currently there do not seem to be any CORS headers being set on those requests.
          Ken Fyten made changes -
          Assignee Ken Fyten [ ken.fyten ] Mircea Toma [ mircea.toma ]
          Assignee Priority P1 [ 10010 ]
          Ken Fyten made changes -
          Link This issue depends on ICE-10294 [ ICE-10294 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #42723 Wed Oct 08 17:41:22 MDT 2014 mircea.toma ICE-10285 Added context parameter that can be used to modify where Bridgeit code can be loaded from.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/mobi/component/src/org/icefaces/mobi/renderkit/BridgeItResourceHandler.java
          Hide
          Mircea Toma added a comment -

          Added context parameter that can be used to modify where Bridgeit code can be loaded from. When the provided URL starts with '/' character the URL will be resolved relative to the application's context path.

          Show
          Mircea Toma added a comment - Added context parameter that can be used to modify where Bridgeit code can be loaded from. When the provided URL starts with '/' character the URL will be resolved relative to the application's context path.
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ken Fyten added a comment -

          Re-open, this new config param needs to be added to the wiki docs under configuration.

          Show
          Ken Fyten added a comment - Re-open, this new config param needs to be added to the wiki docs under configuration.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Mircea Toma added a comment -
          Show
          Mircea Toma added a comment - Added Wiki documentation: http://www.icesoft.org/wiki/display/ICE/mobi.bridgeit.javaScriptURI
          Mircea Toma made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ken Fyten made changes -
          Issue Type Task [ 3 ] Improvement [ 4 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #48982 Fri Jun 24 15:59:07 MDT 2016 judy.guglielmin MOBI-1156 bridgeit.js now served as resource from http://api.bridgeit.mobi/bridgeit/v1.x-latest/bridgeit.js and configurable as per ICE-10285
          Files Changed
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/contactlist/ContactListMeta.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/cloudpush/RegisterCloudPushMeta.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/utils/MobiJSFUtils.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/microphone/MicrophoneMeta.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/video/VideoCaptureMeta.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/camera/CameraMeta.java
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/utils/Base64.java
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/renderkit/BridgeItResourceHandler.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/scan/ScanMeta.java
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/resources/icefaces.mobi/core/bridgeit.js
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/resources/icefaces.mobi/core
          Commit graph ADD /icemobile/trunk/icemobile/jsf/components/component/resources/icefaces.mobi
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/resources/icefaces.ace/META-INCLUDE/faces-config.xml
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/augmentedreality/AugmentedRealityMeta.java
          Commit graph MODIFY /icemobile/trunk/icemobile/jsf/components/component/src/org/icefaces/mobi/component/bridgeit/BridgeItMeta.java
          Commit graph DEL /icemobile/trunk/icemobile/jsf/components/component/resources/org.icefaces.component.util/bridgeit.js

            People

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

              Dates

              • Created:
                Updated:
                Resolved: