Is it possible to configure an Extjs combobox where the remote queryMode utilises a jsonp request?
1 Answers
2
votes
Yes just make your store use a http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.proxy.JsonP
Ext.define('User', {
extend: 'Ext.data.Model',
fields: ['id', 'name', 'email']
});
var store = Ext.create('Ext.data.Store', {
model: 'User',
proxy: {
type: 'jsonp',
url : 'http://domainB.com/users'
}
});
Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Choose User',
store: store,
queryMode: 'remote',
displayField: 'email',
valueField: 'id',
renderTo: Ext.getBody()
});
The following script tag will be injected
<script src="http://domainB.com/users?callback=callback1"></script>