[open-ils-commits] r17696 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 15 12:26:57 EDT 2010


Author: erickson
Date: 2010-09-15 12:26:53 -0400 (Wed, 15 Sep 2010)
New Revision: 17696

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js
Log:
2 debugging tools for identifying undefined IDL classes

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-15 14:50:05 UTC (rev 17695)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-15 16:26:53 UTC (rev 17696)
@@ -56,10 +56,15 @@
             }
             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) {

Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js	2010-09-15 14:50:05 UTC (rev 17695)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js	2010-09-15 16:26:53 UTC (rev 17696)
@@ -20,6 +20,8 @@
             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();
         },
 



More information about the open-ils-commits mailing list