Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.2
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces 2 ACE
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial, Compatibility/Configuration
Description
Currently, the mandatoryResource scheme in ICEfaces 2.0.x will (by default) automatically preload all JavaScript and CSS resources required by all components in the icefaces-ace.jar. This can result in many JS resources being loaded that are not actually used on a given page, which extends page load and initialization times and increases bandwidth requirements. This is done this way currently to ensure that all components can be added to the page after the initial page load (dynamically) via an ajax update and they will still function. The reason they may not function is that JSF 2 doesn't support dynamically updating the HEAD region of a page, so if a component requires it's resources to be loaded in the head, it must be done at initial page load time.
Options for improving this include:
1. Change default to not pre-load any components by default, users can use existing mandatoryResource config param to tune behavior for their needs. Downside is app. may fail initially when comps are added dynamically, user may not know to tune the mandatoryResource entry, etc. Not other JSF2 frameworks handle this (besides us), however.
2. Optimize ACE comps. to limit resources that must be loaded in the head region, thus reducing the size of JS that is loaded on every page. Not clear if this is feasible and to what extent it would help. Using a dynamic loading strategy (such as YUI loader) to load comp. resources could help with this.
3. Others ?
Options for improving this include:
1. Change default to not pre-load any components by default, users can use existing mandatoryResource config param to tune behavior for their needs. Downside is app. may fail initially when comps are added dynamically, user may not know to tune the mandatoryResource entry, etc. Not other JSF2 frameworks handle this (besides us), however.
2. Optimize ACE comps. to limit resources that must be loaded in the head region, thus reducing the size of JS that is loaded on every page. Not clear if this is feasible and to what extent it would help. Using a dynamic loading strategy (such as YUI loader) to load comp. resources could help with this.
3. Others ?
Issue Links
- depends on
-
ICE-7258 Change default value for 'mandatoryResourceConfiguration' from null to 'none'
- Closed
I tried using jQuery's onReady event on MaskedEntry, while loading core.js and inputmask.js in the body, and the component was initialized correctly in the browser.
I just wrapped the initialization call inside jQuery(function()
{ ... });
The entire thing looked like this:
{mask:'999-99-9999'}jQuery(function() {widget_frm1__t8 = new ice.ace.InputMask('frm1:_t8',
)});
I still need to test if this works when adding components dynamically.