the URL that the component will use to reload data during binding
var myform = new webix.ui({
container: "box",
view: "form",
...
dataFeed: "data/form.php"
});
myform.bind(mygrid);
In the related sample the property is used in the 'binding' context. This allows you to reload data in the bound component directly from the server, not from the master component as expected.
For example, you have a form bound to a grid. The form displays details of the record selected in the grid. Let's assume you select a record. What happens with the slave component?
The logic of "dataFeed" behaviour is the same for forms and collections (i.e. data components), yet the difference lies in the parameters for the URL that is formed to send requests to server:
Let's assume that dataFeed is "data/form.php":
where obj is the selected data item in the master component.
Datafeed can be also defined as a function that reloads data for the component.
In the code below, the suggest component linked to an input reloads data based on the current input value:
webix.ui({
view: "suggest",
keyPressTimeout: "1000",
input: $$("text_search"),
body: {
dataFeed: function (text) {
this.load("server/data.php?filter[value]="+text)
}
}
});