From: erickson Date: Fri, 27 Feb 2009 17:05:15 +0000 (+0000) Subject: throw meaningful error when IDL link is invalid X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e08bfaf2d04feb34d9c58dddd337a29fd3f1cf06;p=Evergreen.git throw meaningful error when IDL link is invalid git-svn-id: svn://svn.open-ils.org/ILS/trunk@12314 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 e1e43cb31a..06819c48a3 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -188,6 +188,9 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { } } + if(!vfield) + throw new Error("'" + linkClass + "' has no '" + self.idlField.key + "' field!"); + this.widget.searchAttr = this.widget.labelAttr = vfield.selector || vfield.name; this.widget.valueAttr = vfield.name;