PDA

View Full Version : [OPEN-759][3.2beta]Ext.ux.form.ItemSelector is still missing setValue method!



Stju
20 Mar 2010, 6:50 PM
Ext.ux.form.ItemSelector is still missing setValue method!
Solution - add setValue method.


setValue: function(val) {
if(!val) {
return;
}
val = val instanceof Array ? val : val.split(',');
var rec, i, id;
for(i = 0; i < val.length; i++) {
id = val[i];
if(this.toMultiselect.view.store.getById(id)) {
continue;
}
rec = this.fromMultiselect.view.store.getById(id);
if(rec) {
this.toMultiselect.view.store.add(rec);
this.fromMultiselect.view.store.remove(rec);
}
}
this.fromMultiselect.view.refresh();
this.toMultiselect.view.refresh();
}
Stju

sothea
8 Feb 2011, 9:03 PM
How can I set new value in itemselector? I have 3 radio boxes (a,b,c). When I click on a, It displays (1,2,3,4) and b, it displays (b1,b2,b3,b5) and c, it displays (6,7,8,9,1).

prem.i2i
21 Apr 2011, 12:50 AM
How to add setValue() method in itemselector.js