DataValue

class webix.DataValue(data)
Arguments:
  • data (object) – A configuration object

Datavalue component.

References

helpers
isUndefined(), proto(), views(), uid().
mixins
BaseBind(), EventSystem().

External references

Official documentation page.

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
webix.DataValue = webix.proto({
    name:"DataValue",
    isVisible:function(){ return true; },
    $init:function(config){
        if (!config || webix.isUndefined(config.value))
            this.data = config||"";

        var id = (config&&config.id)?config.id:webix.uid();
        this._settings = { id:id };
        webix.ui.views[id] = this;
    },
    setValue:function(value){
        this.data = value;
        this.callEvent("onChange", [value]);
    },
    getValue:function(){
        return this.data;
    },
    refresh:function(){ this.callEvent("onBindRequest"); }
}, webix.EventSystem, webix.BaseBind);