[open-ils-commits] r13939 - branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 1 10:19:23 EDT 2009


Author: erickson
Date: 2009-09-01 10:19:21 -0400 (Tue, 01 Sep 2009)
New Revision: 13939

Modified:
   branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Log:
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

Modified: branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-09-01 14:18:52 UTC (rev 13938)
+++ branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-09-01 14:19:21 UTC (rev 13939)
@@ -115,7 +115,7 @@
             }
             
             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 @@
          * 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); 



More information about the open-ils-commits mailing list