teach the IDL how to teach JSON_v1 how to load classes when they are not yet loaded...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Oct 2009 19:47:53 +0000 (19:47 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 29 Oct 2009 19:47:53 +0000 (19:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14683 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/fieldmapper/IDL.js

index ff0d7af..ae80b74 100644 (file)
@@ -24,6 +24,12 @@ if(!dojo._hasResource["fieldmapper.IDL"]) {
                         if (i > 0) idl_url += '&';
                         idl_url += 'class=' + trim_class;
                     }
+
+                    JSON2js.fallbackObjectifier = function (arg, key_name, val_name) {
+                        fieldmapper.IDL.load([key_name]);
+                        return decodeJS(arg);
+                    }
+                    
                 }
                         
                 var self = this;