Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.2
-
Fix Version/s: 3.3
-
Component/s: None
-
Labels:None
-
Environment:IF 3.x
Description
Many common issues on the forums are related to users not being familiar with the resource loading requirements of dynamically included components in ICEfaces 3. If we used a ACE-wide Javascript object to initialize our component instances, we could detect if component resources are loaded, and provide directions to resource loading instructions if they are missing, and for which component, rather than having the browser vaguely complain about undefined objects.
For example the dataTable initializes its Javascript instance currently like:
var widgetVar = new ice.ace.DataTable(id, { configObj... });
and markup would be minimally changed to be like:
var widgetVar = ice.ace.create('DataTable', id, { configObj... });
where ice.ace.create would look something like:
var ice.ace.create = function(compName, id, cfg) {
var constructor = ice.ace[compName];
if (constructor) return new constructor(id, cfg);
else ice.ace.resourceError(compName);
}
For example the dataTable initializes its Javascript instance currently like:
var widgetVar = new ice.ace.DataTable(id, { configObj... });
and markup would be minimally changed to be like:
var widgetVar = ice.ace.create('DataTable', id, { configObj... });
where ice.ace.create would look something like:
var ice.ace.create = function(compName, id, cfg) {
var constructor = ice.ace[compName];
if (constructor) return new constructor(id, cfg);
else ice.ace.resourceError(compName);
}
Revision #33147
Committed by nils.lundquist
Moments ago
ICE-8818- ACE component JS objects now built via ice.ace.create factory. Enables intelligent error messages for missing resources.Some components build themselves in atypical ways. Some still use YUI initialization / updating and will need to be refactored before using ice.ace.create. This issue will stay open to log which components have atypical initialization and log progress on their modification.