[Checkins] SVN: z3c.relationfieldui/trunk/ Use .value instead of setAttribute as dynamically inserted

Martijn Faassen faassen at infrae.com
Sun Dec 14 12:30:28 EST 2008


Log message for revision 94058:
  Use .value instead of setAttribute as dynamically inserted
  elements do not appear to be updated in the UI otherwise.

Changed:
  U   z3c.relationfieldui/trunk/CHANGES.txt
  U   z3c.relationfieldui/trunk/src/z3c/relationfieldui/resources/relation.js

-=-
Modified: z3c.relationfieldui/trunk/CHANGES.txt
===================================================================
--- z3c.relationfieldui/trunk/CHANGES.txt	2008-12-14 14:42:00 UTC (rev 94057)
+++ z3c.relationfieldui/trunk/CHANGES.txt	2008-12-14 17:30:27 UTC (rev 94058)
@@ -4,7 +4,9 @@
 0.1.2 (unreleased)
 ==================
 
-* ...
+* Update the value of the input field using ``.value`` instead of
+  using ``setAttribute('value', ...)``. The latter did not update
+  dynamically updated input fields, and the former does.
 
 0.1.1 (2008-12-10)
 ==================

Modified: z3c.relationfieldui/trunk/src/z3c/relationfieldui/resources/relation.js
===================================================================
--- z3c.relationfieldui/trunk/src/z3c/relationfieldui/resources/relation.js	2008-12-14 14:42:00 UTC (rev 94057)
+++ z3c.relationfieldui/trunk/src/z3c/relationfieldui/resources/relation.js	2008-12-14 17:30:27 UTC (rev 94058)
@@ -68,7 +68,7 @@
 
     Z3C.relation.RelationCreator.prototype.setRelations = function(values) {
         if (values.length > 0) {
-            this._el.setAttribute('value', values[0]);
+            this._el.value = values[0];
         }
         // break potential circular reference
         this._win.relation_creator = null;



More information about the Checkins mailing list