Webix Jet - call to a php with parameters

Hi,

i would like to create an interface with 2 columns.
Each of them would contain a view:datatable .

I want to load the column 2 data from the server (php) based on the selection (id) in the column 1.

How do i pass parameters to server script when i work with Webix Jet framework?

Webix Jet doesn’t require any special handling, you can use data binding as for normal views. ( use .bind API or onAFterSelect event handler )

If you want to store each part of UI as separate views, you can use a global collection or app level events.

Im looking at the Jet demo. Bellow is the code where the “data” view gets its data from the “records” model.

The “data” view is then used in a more complex layout(LayoutMain).

Now i want to create a dropdown view in LayoutMain with values like 1,2,3,4. And each time i select a value from dropdown this should be temporary stored somewhere and the DataCollection (records.js) should be called with the value from dropdown and should be passed to the server side script (as GET or POST).

How should i do that?


data.js

define([
“models/records”
],function(records){

var ui = {rows:[
	{
	view:"datatable", id:"tabela", autoConfig:true
	},
	{
	template: "datatable"
	}
]};

return {
	$ui: ui,
	$oninit:function(view){
		$$("tabela").parse(records.data);
	}
};

});


recors.js

define([],function(){

var collection = new webix.DataCollection({ 
url: "http://example.com/mydata.php"

});

return {
	data: collection
};

});