2 debugging tools for identifying undefined IDL classes
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 15 Sep 2010 16:26:53 +0000 (16:26 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 15 Sep 2010 16:26:53 +0000 (16:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17696 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Open-ILS/web/js/dojo/openils/widget/AutoWidget.js

index 84bdb76..fd0d0ed 100644 (file)
@@ -56,10 +56,15 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
             }
             this.dijitArgs['scrollOnFocus'] = false;
 
+
             // find the field description in the IDL if not provided
             if(this.fmObject) 
                 this.fmClass = this.fmObject.classname;
             this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+
+            if(this.fmClass && !this.fmIDL)
+                throw new Error("IDL class '" + this.fmClass + "' not defined");
+
             this.suppressLinkedFields = args.suppressLinkedFields || [];
 
             if(this.selfReference) {
index e4f11ab..66ac5de 100644 (file)
@@ -20,6 +20,8 @@ if(!dojo._hasResource['openils.widget.AutoWidget']) {
             if(this.fmObject)
                 this.fmClass = this.fmObject.classname;
             this.fmIDL = fieldmapper.IDL.fmclasses[this.fmClass];
+            if(this.fmClass && !this.fmIDL)
+                throw new Error("IDL class '" + this.fmClass + "' not defined");
             this.buildSortedFieldList();
         },