Hello Ext experts,
coming from the pure o-o MVC paradigm, I am currently implementing the transfer of widget values to my model objets in my first Ext JS project.
It seems that in Ext JS the transfer of a value entered by the user in some widget happens only via one some event and the function, which is bound to this event (like: change: or blur: etc).
Obviously, it would make sense to have this handled by one central and generic dispatcher function, which receives the call upon the event and transfers to widget's value to the related model instance.
So far so bad, because how should this one central and generic function determine the model instance? I don't see a good chance for that, especially if there are several instances of the same model class.
Is it possible to bind some model attribute (instance variable) directly to some widget so that they communicate any change bi-directionally and automatically, i.e. a change to the model changes the view and change in the view [= entry] changes the model.
This is what nornally happens in MVC systems and it's most convenient, because there is no need to write explicit transfer code for every widget and instVar (which will become very big and cumbersome). Also, the instVar setter method then does the value validation for the widget, which keeps the app logic where it belongs and that is in the model.
Please note that in my second release there will be plenty of danamically generated widgets representing insrVars from many instances of several model classes. This makes a direct MVC-like binding even more desirable.
I found no such subject in the doc or in the turorials.
Thank you for your comments and hints