Lose bindings when changing view.

http://webix.com/snippet/96b47481

When I change the template in a view, I seem to lose the bindings made to the template being swapped. I switch the template in the "onChange", is this the best way to do this. I originally swapped the whole view but reduced to template as thats all that changed.

Any ideas would be much appreciated.

Gee

Tagged:

Comments

  • edited January 9

    Hello,

    It's rather an extensive way to change just the template of a Template widget. You needn't replace it via webix.ui. It destroys the target view and creates the new one in its place. That's why binding is lost.

    Instead, you can change the text template of a Template as

    var details_offers = "<p>Offers Panel</p><b>#title#</b>";
    
    $$("details").define("template", details_offers); 
    $$("details").refresh();
    

    Check the following snippet, please http://webix.com/snippet/ee6b60b1

  • thanks for your assistance again. I had been replacing the whole view so reducing to just the text of the template is a far better solution. Learning slowly.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion