ValueBind¶
-
class
webix.
ValueBind
()¶ Valuebind mixin
Referenced by¶
- mixins
BindSource()
.
External references¶
Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | webix.ValueBind={
$init:function(){
this.attachEvent("onChange", this._update_binds);
},
_bind_update:function(target, rule, format){
rule = rule || "value";
var data = this.getValue()||"";
if (format) data = format(data);
if (target.setValue)
target.setValue(data);
else if (!target.filter){
var pod = {}; pod[rule] = data;
if (target._check_data_feed(data))
target.setValues(pod);
} else{
target.data.silent(function(){
this.filter(rule,data);
});
}
target.callEvent("onBindApply", [data,rule,this]);
}
};
|