PDA

View Full Version : Strategies for updating controls as data changes?



m4dc4p
29 Sep 2011, 11:06 AM
On my page, a Store gets updated asynchronously by the server. When data in the store changes, a Panel on the same page (might) need to change its title. The Store contains many rows, but the Panel's title comes from a single row selected with user-provided parameters.

I would like the Panel title to update whenever that particular row changes. What's the best option? Ext.view.View? datachanged events? Does ExtJS have any other built-in mechanism?

Thanks for any advice! Please let me know if the question isn't clear!

bodyboarder20
29 Sep 2011, 4:51 PM
Since model's don't have any event's themselves, you could put a listener on your store, listen for applicable events (change/update), and if that particular model is updated, then refresh the view of the panel? Not very elegant - but would get the job done....