projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3b4e62
)
Roo/form/ComboBoxArray.js
author
Alan Knowles
<alan@roojs.com>
Wed, 2 May 2012 06:09:12 +0000
(14:09 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 2 May 2012 06:09:12 +0000
(14:09 +0800)
Roo/form/ComboBoxArray.js
patch
|
blob
|
history
diff --git
a/Roo/form/ComboBoxArray.js
b/Roo/form/ComboBoxArray.js
index
932b761
..
74556bf
100644
(file)
--- a/
Roo/form/ComboBoxArray.js
+++ b/
Roo/form/ComboBoxArray.js
@@
-268,24
+268,28
@@
Roo.extend(Roo.form.ComboBoxArray, Roo.form.TextField,
setValue: function(v) // not a valid action - must use addItems..
{
setValue: function(v) // not a valid action - must use addItems..
{
- Roo.log(v);
+
if (this.store.isLocal) {
// then we can use the store to find the values..
// comma seperated at present.. this needs to allow JSON based encoding..
this.hiddenField.setValue(v);
if (this.store.isLocal) {
// then we can use the store to find the values..
// comma seperated at present.. this needs to allow JSON based encoding..
this.hiddenField.setValue(v);
- var ar = [];
- Roo.each(v.split(','), function(v) {
+ var v_ar = [];
+ Roo.each(v.split(','), function(k) {
+ var li = this.store.query(this.store.valueField, k);
+ if (!li.length) {
+ return;
+ }
+ add = {};
+ add[this.store.valueField] = k;
+ add[this.store.displayField] = li.item(0).data[this.store.displayField];
-
- });;
-
+ this.addItem(add);
+ }, this);;
+
}
}
- var _this = this;
- Roo.each(v, function(l) {
- _this.addItem(l);
- });
+
},
setFromData: function(v)
},
setFromData: function(v)