Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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.).
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
- depends on
-
ICE-10294 Unable to access BridgeIt when page is first loaded using ajax (must be a GET)
- Closed
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.