Abhay Chadha
Abhay Chadha

Reputation: 75

Is there a way to dynamically bind model values to a form in extJS 4.2?

I want to update my form values as soon as my model is updated, does extJS(4.2) provide a way to implement the same out of the box(as angular does)

Upvotes: 0

Views: 461

Answers (1)

mindparse
mindparse

Reputation: 7235

If possible you should use ExtJS 5 as they have now added MVVM support (read more here => http://docs.sencha.com/extjs/5.1/whats_new/5.0/whats_new.html#New_Application_Architectures___Welcome_MVVM)

So this would give you the two way data binding behaviour that AngularJS provides.

If you have to stick with using ExtJS 4 then you could listen for the store's update event and then in the listener handler call loadRecord() on your form passing in the model instance that has been updated

Upvotes: 1

Related Questions