I have a server that exposes information in a json format and i want to configure a Ext.data.Store to access this server dinamically but i have some problems with the store as it throws allot of Access-Header-Origin errors.
The server uses RemObjects and DataAbstract. It exposes my information through oData 2.0. Here is my store config:

var vStore = new Ext.data.Store({
                    autoLoad: true,
                    autoSync: true,
                    model: 'ProiecteWEB.model.Agenti',
                    proxy: {
                        type: 'ajax',
                        useDefaultXhrHeader: false,
                        //noCache: false,
                        withCredentials: false,
                        pageParam: '',
                        limitParam: '',
                        startParam: '',
                        //useDefaultXhrHeader: false,
                        username: 'user',
                        password: 'pass',
                        url: 'http://server-address/oData/table?$format=json',
                            type: 'json',
                            rootProperty: 'results'
I want to achieve this so i can implement a simple arhitecture of the app view's just as the Sencha Arhitect does. But i am unable to dinamically load the store just throygh declaration.

I tried with JsonP, Ajax and rest