peterpaul
20 Jul 2009, 2:55 AM
Hi,
Whenever i use a gridpanel or formpanel which request data from server (tomcat) the tomcat authentification dialog is shown (please enter username und pwd for localhost). if i cancel these dialogs everything works out fine (data is retrieved).
if i do an explicit ajax call no authentification dialog is shown:
Ext.Ajax.request({
url: '/Data',
method: 'GET',
success: function(response){
console.info('successful');
},
failure: function(response){
console.error('error ');
},
params: {
operation: 'search',
}
});
works fine!
But with the following the authentification dialog is shown:
var conn = new Ext.data.Connection().request({
url: '/Data',
method: 'GET',
params: {
operation: 'search'
},
failure: function(){console.info('failure');},
success: function(){
console.info('success');
}
});
var store = new Ext.data.JsonStore({
root: 'data',
idProperty: '1',
autoLoad: true,
fields: [
{name: '2', mapping: '2', type: 'date', dateFormat: 'timestamp'},
{name: '3', mapping: '3'},
{name: '4', mapping: '4'},
{name: '5', mapping: '5'},
{name: '6', mapping: '6'}
],
listeners: {
load: function(){
console.debug("Loaded");
},
loadexception: function(){
console.debug("Not loaded");
}
},
proxy: new Ext.data.HttpProxy(conn)
});
var grid = new Ext.grid.GridPanel({
width:700,
height:500,
title:' ',
store: store,
trackMouseOver:false,
disableSelection:true,
loadMask: true,
// grid columns
columns:[
{
header: '1',
dataIndex: '1',
width: 0,
sortable: false,
hidden: true
},{
header: ' ',
dataIndex: '2',
width: 100,
sortable: true
},{
header: ' ',
dataIndex: '3',
width: 100,
hidden: false,
sortable: true
},{
header: ' ',
dataIndex: '4',
width: 100,
align: 'right',
sortable: true
},{
header: ' ',
dataIndex: '5',
width: 200,
sortable: true
}]
});
Any ideas what i am missing?!
ty
greatings from austria
peterpaul :-/
Whenever i use a gridpanel or formpanel which request data from server (tomcat) the tomcat authentification dialog is shown (please enter username und pwd for localhost). if i cancel these dialogs everything works out fine (data is retrieved).
if i do an explicit ajax call no authentification dialog is shown:
Ext.Ajax.request({
url: '/Data',
method: 'GET',
success: function(response){
console.info('successful');
},
failure: function(response){
console.error('error ');
},
params: {
operation: 'search',
}
});
works fine!
But with the following the authentification dialog is shown:
var conn = new Ext.data.Connection().request({
url: '/Data',
method: 'GET',
params: {
operation: 'search'
},
failure: function(){console.info('failure');},
success: function(){
console.info('success');
}
});
var store = new Ext.data.JsonStore({
root: 'data',
idProperty: '1',
autoLoad: true,
fields: [
{name: '2', mapping: '2', type: 'date', dateFormat: 'timestamp'},
{name: '3', mapping: '3'},
{name: '4', mapping: '4'},
{name: '5', mapping: '5'},
{name: '6', mapping: '6'}
],
listeners: {
load: function(){
console.debug("Loaded");
},
loadexception: function(){
console.debug("Not loaded");
}
},
proxy: new Ext.data.HttpProxy(conn)
});
var grid = new Ext.grid.GridPanel({
width:700,
height:500,
title:' ',
store: store,
trackMouseOver:false,
disableSelection:true,
loadMask: true,
// grid columns
columns:[
{
header: '1',
dataIndex: '1',
width: 0,
sortable: false,
hidden: true
},{
header: ' ',
dataIndex: '2',
width: 100,
sortable: true
},{
header: ' ',
dataIndex: '3',
width: 100,
hidden: false,
sortable: true
},{
header: ' ',
dataIndex: '4',
width: 100,
align: 'right',
sortable: true
},{
header: ' ',
dataIndex: '5',
width: 200,
sortable: true
}]
});
Any ideas what i am missing?!
ty
greatings from austria
peterpaul :-/