-
24 Dec 2010 1:56 AM #1
Design combo with ArrayStore - (cannot read property autoCreate - lack of 'field'?)
Design combo with ArrayStore - (cannot read property autoCreate - lack of 'field'?)
When I create a new ArrayStore in the designer, I set the data to
I set the class to 'SettlementStore' and the store id to 'SettlementStoreId' and the idIndex to 1 (presumably this should show T+1..T+10 in the combo).Code:[ [1,"T+1"], [2,"T+2"], [3,"T+3"], [4,"T+4"], [5,"T+5"], [6,"T+6"], [7,"T+7"], [8,"T+8"], [9,"T+9"], [10,"T+10"] ]
When I associate the combo box to use the SettlementStoreId, I get the error
Uncaught TypeError: Cannot read property 'autoCreated' of undefined
All I can think of, is that in examples where it's coded by hand, you specify the 'fields', but within the designer there is no option to do that.
What could I be missing, or is this a limitation in the designer? - What would a workaround be, i.e. creating the store in code and then how to assign to the generated ui code.
Many thanks,
Rob.
-
24 Dec 2010 2:05 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
1. You probably want idIndex:0 (I assume the identity field is the number and not the text).
2. Cannot read property 'autoCreate' of undefined is an error from the combobox and not of the store. How exactly are you setting up this combobox?
-
24 Dec 2010 2:33 AM #3
Hi Condor,
Thank you for your quick reply.
The combo is created mostly with defaults, but I've entered the class name, store ID and associated it to the array data store.
The hiearchy is
viewport -> panel (card layout) -> panel -> form -> fieldset -> combo
Is this enough to help, or should I try to re-create in a small sample project?
Cheers,
Rob.
-
24 Dec 2010 2:40 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Did you set the 'transform' config option?
-
24 Dec 2010 2:53 AM #5
Nope - I feel like I'm missing something? ;-) Are you saying I need to do a transform of some sort on the combo?
What's the deal with the missing 'fields' parameter?
Cheers,
Rob.
-
24 Dec 2010 2:59 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
An ArrayStore with local data needs to be configured with 'fields' and 'data', e.g.
Code:fields: ['value', 'text'], idIndex: 0, data: [[1, 'One'], [2, 'Two'], [3, 'Three']]
-
24 Dec 2010 3:12 AM #7
That was my original point - how do you set the fields in the designer? I can't see the attributes in the ArrayStore.
If I type 'field' in the property inspector, to filter the attributes displayed, it only shows sortField ... so How can I specify the fields attribute through designer, or a workaround for an alternative?
What was the reference to transforming - was that related to your fields reply?
Thanks,
Rob.
-
24 Dec 2010 3:41 AM #8Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
I don't use the Designer, so I had to fire it up for this question...
Right click on the store and select Add fields.
-
24 Dec 2010 4:23 AM #9
Ah! A context menu, I didn't even know there were any - it's not obvious

Thank you!
-
5 Jan 2011 8:46 AM #10
My problem turned out to be that I forgot to add the new <JavaScript> import in my HTML file (doh!), but you tips about adding fields were still required.
Thanks Codor,
Rob.
Similar Threads
-
[CLOSED] combo autoSelect doesn't work with ArrayStore
By PaloAltoNetworks in forum Ext 3.x: BugsReplies: 2Last Post: 14 Dec 2010, 2:16 AM -
Combo with arraystore: this.proxy is undefined error
By Tumac in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 23 Nov 2010, 12:35 PM -
ArrayStore/SimpleStore Combo before onReady error?
By SlashEMc2k in forum Ext.air for Adobe AIRReplies: 3Last Post: 4 Aug 2010, 6:38 AM -
Issue with a Combo combined to a static ArrayStore in an EditorGridPanel
By samax in forum Ext 3.x: Help & DiscussionReplies: 4Last Post: 12 Mar 2010, 3:13 AM -
Some text after form field (autoCreate: true)
By 72 in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 4 May 2007, 6:04 AM


Reply With Quote