Binding to PHP

I made a binding between datatable and list.

$$("orders").bind($$("proformas"), "$data", function(obj,source){
    if (!obj) return this.clearAll();
    return self.load("/orders/"+obj.id);
});

But function runs forever. It triggers itself.

Hi,

If “self” refers to $$(“proformas”), the bind() method will be called after self.load(…). It is correct because master datastore was change.

bind() method should be applied to a view where you want to load data.

Sorry i forgot to add var self = this;
self refers to “orders”

Hi,

try to call this.load("/orders/"+obj.id); within blockEvent-unblockEvent methods. In this case, binding handling won’t be called after data loading:

$$("orders").bind($$("proformas"), "$data", function(obj,source){
    this.clearAll();
    if(obj){
          this.data.blockEvent();
          this.load("/orders/"+obj.id);
          this.data.unblockEvent();
    }
});

Still not working.

Hi,

could you create a demo that shows the problem ?

http://webix.com/snippet/