Results 1 to 3 of 3

Thread: Form combo - Uncaught TypeError: Cannot call method 'read' of undefined

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    48
    Answers
    1

    Default Answered: Form combo - Uncaught TypeError: Cannot call method 'read' of undefined

    Code:
    JavaScript console is displaying the above error when loading my form. I have traced the source of this error to the loading of the following combobox

    Code:
    , {
    				xtype : 'combo',
    				store : Ext.create('Ext.data.Store', {
    					model : 'Ext.callback.CallbackTimeModel',
    					root : {
    						expanded : true
    					},
    					proxy : {
    						type : 'ajax',
    						url : '/servlet/CallbackTimeServlet?action=getCallbackTimeByCompany'
    					},
    					folderSort : true,
    					autoLoad : true
    				}),
    				valueField : 'callTimeThreshold',
    				value : 0,
    				displayField : 'callTimeName',
    				triggerAction : 'all',
    				editable : false,
    				name : 'callTime',
    				itemId : 'callbackReportCallTime',
    				colspan : 2
    			}
    Basically the combo never loads. I'm not sure how to debug what is 'undefined' during combo loading. I've double checked the proxy url that the combo is pointing to and it returns data fine, so the store should be getting populated. Any suggestions on how to go about debugging this error? Thanks

  2. Try creating and loading your store first, then assign that store to your combo.

    xtype : 'combo'
    store: 'comboStore' // defined, loaded earlier.

    Scott.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716

    Default

    Try creating and loading your store first, then assign that store to your combo.

    xtype : 'combo'
    store: 'comboStore' // defined, loaded earlier.

    Scott.

  4. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    48
    Answers
    1

    Default

    Thanks, I was able to fix the problem.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •