proxy

webix.proxy(name, source, extra)

webix.proxy helper.

Please look into the linked official documentation.

References

helpers
assert(), copy(), extend().

Referenced by

components
DataProcessor().
views
slider().

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.proxy = function(name, source, extra){
    webix.assert(webix.proxy[name], "Invalid proxy name: "+name);

    var copy = webix.copy(webix.proxy[name]);
    copy.source = source;

    if (extra)
        webix.extend(copy, extra, true);

    if (copy.init) copy.init();
    return copy;
};

webix.proxy.$parse = function(value){
    if (typeof value == "string" && value.indexOf("->") != -1){
        var parts = value.split("->");
        return webix.proxy(parts[0], parts[1]);
    }
    return value;
};