I have several grids that display data that doesn't really map to a Model, e.g. statistics, counts, etc. The values they display are dynamically generated by the server based on the currently-logged in user, and could be related to any number of server-side models.
It seems silly to set up an ExtJS Model for these situations. They might look something like:
Ext.define('???', {
extend: 'Ext.data.Model',
fields: ['name', 'count']
});
It doesn't make sense to me. I know the fields
attribute of the store is still there, but the documentation states it is only really there for backwards compatibility and should be avoided. Plus, at least with the compatibility layer running, there's the console warning against using it.
So what is the "proper" approach for these situations?
Had a similar problem. Sencha claim that in such a case it's ok to use the 'fields' property. Check out this thread:
http://www.sencha.com/forum/showthread.php?136362-Extjs-4-Dynamic-Model/page2
on their forum.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With