[open-ils-commits] r12099 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 6 17:11:37 EST 2009
Author: erickson
Date: 2009-02-06 17:11:32 -0500 (Fri, 06 Feb 2009)
New Revision: 12099
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
don't attempt to retrieve the linked selector objects if the data is not retrievable via pcrud
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-02-06 17:58:04 UTC (rev 12098)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-02-06 22:11:32 UTC (rev 12099)
@@ -117,15 +117,19 @@
},
_buildLinkSelector : function() {
- if(this.idlField.reltype != 'has_a') return false;
+ /* verify we can and should grab the related class */
+ var linkClass = this.idlField['class'];
+ if(this.idlField.reltype != 'has_a') return false;
+ if(!fieldmapper.IDL.fmclasses[linkClass].permacrud) return false;
+ if(!fieldmapper.IDL.fmclasses[linkClass].permacrud.retrieve) return false;
+
dojo.require('openils.PermaCrud');
dojo.require('dojo.data.ItemFileReadStore');
dojo.require('dijit.form.FilteringSelect');
var self = this;
this.async = true;
- var linkClass = this.idlField['class'];
this.widget = new dijit.form.FilteringSelect(this.dijitArgs, this.parentNode);
var rclassIdl = fieldmapper.IDL.fmclasses[linkClass];
var vfield;
More information about the open-ils-commits
mailing list