View Full Version : Renamed userClass of a Store cannot be

1 Mar 2012, 5:04 AM
How to reproduce with
- Create new project
- Add a panel
- Add a grid to the panel
- Create a Store, i used JsonPStore
- Rename the userClass of the store to 'Customer'
- Select the grid
- Try to set the store, is is still named MyJsonPStore

In the screenshot below you can see, grid only allows to select MyJsonPStore, but the store was already renamed to CustomerStore.


Best regards

1 Mar 2012, 7:57 AM
The storeId is being displayed here, not the userClassName. Perhaps we should be displaying both the storeId and userClassName in the dropdown to make this more apparent.

Then it would show up like:
MyJsonPStore (Customer)

1 Mar 2012, 8:15 AM
And why do i get a "c.store is undefined" in firebug as soon as i rename the userClass ?

Renaming back to MyStore and everything is working again.

Ignore me if this is a stupid question, i am doing extjs and designer for 4 days ;)

Best regards,

1 Mar 2012, 8:46 AM
And why do i get a "c.store is undefined" in firebug as soon as i rename the userClass ?

You shouldn't be getting that error, if you are able to reproduce could you wrap up your project in an archive and post for us to take a look at?

1 Mar 2012, 9:04 AM
Sure, no problem.
This project is the same scenario I described in my first post.

I renamed MyStore to Customer and it ainīt working, rename it back to MyStore and everything is fine.

zip with the project is attached.

Best regards

1 Mar 2012, 9:47 AM
@afink: the zip you attached is missing the .metadata directory so it won't open in Designer. But looking at the generated class files, I'm pretty sure the problem is that your storeId does not match your class name. This is a known bug in Ext 4.x's MVC where storeId and class name have to be exactly the same.

Can you change your storeId to match and see if that clears up your issue?

1 Mar 2012, 9:57 AM
Changing the storeId to the same value as the userClassName works!

Thanks a lot.

1 Mar 2012, 10:01 AM

FYI we've got an internal ticket open to investigate how Designer can help you avoid this Ext bug, for instance perhaps automatically changing the storeId when you change the userClassName and vice-versa, or showing a warning when they are out of sync.