From e473e0d7c139204016f1d32c099e6a5604441af0 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 1 Sep 2009 14:18:52 +0000 Subject: [PATCH] calling widget.attr on readonly objects occaisonally results in errors from (as yet unexplained) dojo race condition. however, basewidgetvalue is not needed for readOnly widgets, since displaystring is used, so bypasss for now; use dojo.create git-svn-id: svn://svn.open-ils.org/ILS/trunk@13938 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 23192cf4bc..10f6a99a58 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -115,7 +115,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { } if(!this.parentNode) // give it somewhere to live so that dojo won't complain - this.parentNode = document.createElement('div'); + this.parentNode = dojo.create('div'); this.onload = onload; if(this.widgetValue == null) @@ -338,9 +338,7 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { * For widgets that run asynchronously, provide a callback for finishing up */ _widgetLoaded : function(value) { - if(this.readOnly) { - this.baseWidgetValue(this.getDisplayString()); - } else { + if(!this.readOnly) { this.baseWidgetValue(this.widgetValue); if(this.idlField.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence) this.widget.attr('disabled', true); -- 2.11.0