Results 1 to 2 of 2

Thread: ExtJS 6.2 videModel store CORS not working

  1. #1
    Sencha User
    Join Date
    Dec 2011

    Default ExtJS 6.2 videModel store CORS not working

    The following CORS works perfectly when defined from stores:

    Ext.define('', {
        extend: '',
        alias: 'store.students',
        fields: ['fname', 'lname', 'age', 'enrol', 'class',  'gender', 'dom', 'year', 'course', 'pic'],
        proxy: {
            type: 'ajax',
            method: 'get',
            withCredentials: true,
            url: global.getBaseUrl() + 'api/api.php?student=view',
            reader: {type: 'json',    rootProperty: 'rows'
    However, when I define the same store inside the viewModel stores, CORS fails. Following is the code:

    Ext.define('EDUX.view.settings.SettingsModel', {
        extend: '',
        alias: 'viewmodel.settings',
        data: {
            name: 'EDUX',
            school: 'Programme'
        stores: {
            students: {
                fields: ['fname', 'lname', 'age', 'enrol', 'class',  'gender', 'dom', 'year', 'course', 'pic'],
                withCredentials: true,
                proxy: {
                    url:global.getBaseUrl() + 'api/api.php?student=view',
                    type: 'ajax', 
                    reader: {
                        type: 'json', 
                        rootProperty: 'rows'
    Is this a bug or am I doing it wrongly?

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Sydney, Australia


    I attempted to fix up some of the formatting in your post, but it seems like the declarations aren't the same.

    For the viewmodel:
    1) You've omitted the method config
    2) withCredentials is outside of the proxy

Similar Threads

  1. Ext.Ajax.request CORS not working
    By marco.napetti in forum Ext 5: Q&A
    Replies: 5
    Last Post: 17 Oct 2014, 12:01 AM
  2. Replies: 8
    Last Post: 25 Feb 2014, 2:16 PM
  3. CORS not working on IE 8
    By imithun in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 8 Oct 2013, 2:07 AM
  4. Extjs store.load with id causes CORS error
    By wayne-oo in forum Ext: Q&A
    Replies: 3
    Last Post: 27 Aug 2013, 11:50 PM
  5. Working CORS example
    By btek in forum Sencha Touch 2.x: Discussion
    Replies: 11
    Last Post: 2 Nov 2012, 7:13 AM

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