From: erickson Date: Wed, 15 Sep 2010 16:26:53 +0000 (+0000) Subject: 2 debugging tools for identifying undefined IDL classes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f12c52b2aa758a08ece2cb2e23dd9ceee0a366b5;p=evergreen%2Fpines.git 2 debugging tools for identifying undefined IDL classes git-svn-id: svn://svn.open-ils.org/ILS/trunk@17696 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 84bdb760d1..fd0d0edd47 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -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) { diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js index e4f11ab20c..66ac5de48d 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoWidget.js @@ -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(); },