PDA

View Full Version : Only singleton model for store can be used in designer2 property settings



metas
22 Mar 2012, 11:53 PM
Hi people,

In my project, we'll have n view instances(defined with one same class) and n store instances(defined with one same class) mapped to them.

I'm now having a override class defined and override the initComponent method. I don't like this sort of code.
I'v struggled with this for a long time. Searched in Sencha forum too, seems that only one approach to do this:
Set the store when initial like below

mygrid: {
...
store: Ext.create('mystore'),
...
}

But designer2 doesn't support setting property like above. Right?

How can I do this better with designer in the near feature?

I'm using Designer2.0.0 build 311.

Thanks,
Metas

aconran
23 Mar 2012, 5:19 AM
We're aware of the problem and looking for a better solution. For now the best advice I can give you is to abstract every data configuration of the store into a model. Then bind multiple stores to the same model.