url

the URL which the component will use to load data after its initialization

string|function|object url;

Example

webix.ui({
    datatype: "xml",
    url: "data.xml"
    ...
});

Related samples

Details

Used in conjunction with the datatype parameter. If datatype isn't provided, the component will expect data in JSON format.

The url parameter can be set as:

  • string - the path to a file or a script
webix.ui({
    view:"datatable", 
    id:"table",
    url:"some.php"
});
  • function - a function to fetch and parse the data into a widget
{ view:"datatable", id:"table", autoConfig:true, url:function(){
    return webix.ajax(url).then(function(data){
        return data.json();
    });
}};
  • object - the loading proxy object
{ view:"datatable", id:"table", autoConfig:true, url:{
    $proxy:true,
    load:function(view, params){
       return webix.ajax().bind(view).get(url, params);
    }
}};
See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix javascript web framework and page of datagrid javascript product.