PDA

View Full Version : Why am I not seeing any data ?



kurt schrauwen
31 Aug 2010, 3:33 AM
Hello everyone,

I have made a very simple data grid that should get the data out of a MySQL database using PHP.
When I'm looking in firebug my php page gives me back the data but it doesn't show up in the grid.
I'm overlooking something but I don't know what.

Can some one give me a hint of what is wrong here ?

Thanks,
Kurt

this is my js file



Ext.onReady(function(){
Ext.QuickTips.init();

var ds_cleanUpFolders = new Ext.data.Store({
//autoLoad:true,
url:'http://20.16.12.75/cleanUpFolders_GET.php',
reader: new Ext.data.JsonReader({root:'rows',totalProperty: 'results',id:'cleanUpFolderID'}, [
'cleanUpFolderID',
'operatingSystem',
'connection',
'active',
'cleanUpFolder',
'deleteFolder',
'cleanUpSubFolder',
'deleteSubFolder',
'host',
'folderPath',
'fileExtension',
'fileAgeDay',
'deleteFileScanValue',
'incubateFolder',
'comments',
'insID',
'insDate',
'insLoc',
'updID',
'updDate',
'updLoc'
])
});
ds_cleanUpFolders.load();


//Column model to for the cleanupfolders
var cleanUpFoldersColumnModel = new Ext.grid.ColumnModel({
//defaults:{sortable:true},
columns:[
{header:"<b>#</b>", dataIndex:'cleanUpFolderID', width:25, sortable:true, readOnly:true},
{header:"<b>Operating System</b>", dataIndex:'operatingSystem', width:82, sortable:true},
{header:"<b>Connection</b>", dataIndex:'connection', width:60, sortable:true},
{header:"<b>Active</b>", dataIndex:'active', width:38, sortable:true},
{header:"<b>Clean Up Folder</b>", dataIndex:'cleanUpFolder', width:50, sortable:true},
{header:"<b>Delete Folder</b>", dataIndex:'deleteFolder', width:50, sortable:true},
{header:"<b>Clean Up SubFolder</b>", dataIndex:'cleanUpSubFolder', width:50, sortable:true},
{header:"<b>Delete SubFolder</b>", dataIndex:'deleteSubFolder', width:50, sortable:true},
{header:"<b>Host</b>", dataIndex:'host', width:50, sortable:true},
{header:"<b>Folder Path</b>", dataIndex:'folderPath', width:50, sortable:true},
{header:"<b>File Extension</b>", dataIndex:'fileExtension', width:50, sortable:true},
{header:"<b>File Age (in days)</b>", dataIndex:'fileAgeDay', width:50, sortable:true},
{header:"<b>Delete File Scan Value</b>", dataIndex:'deleteFileScanValue', width:50, sortable:true},
{header:"<b>Incubate Folder</b>", dataIndex:'incubateFolder', width:50, sortable:true},
{header:"<b>Comments</b>", dataIndex:'comments', width:50, sortable:true},
{header: "insID", dataIndex: 'insID', width:150, hidden:true},
{header: "insDate", dataIndex: 'insDate', width:150, hidden:true},
{header: "insLoc", dataIndex: 'insLoc', width:150, hidden:true},
{header: "updID", dataIndex: 'updID', width:150, hidden:true},
{header: "updDate", dataIndex: 'updDate', width:150, hidden:true},
{header: "updLoc", dataIndex: 'updLoc', width:150, hidden:true}
]
});

var CleanUpFoldersListEditorGrid = new Ext.grid.GridPanel({
region: 'center',
id: 'CleanUpFoldersListEditorGrid',
frame:true,
header: true,
autoScroll: true,
iconCls: 'gen_cleanupfolders_grid',
title: 'Properties, Clean Up Folders',
store:ds_cleanUpFolders,
cm: cleanUpFoldersColumnModel,
enableColumnMove: true,
stripeRows: true,
trackMouseOver: true,
columnLines: true,
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: ds_cleanUpFolders,
displayInfo:true,
displayMsg:"Displaying Records(s) {0} - {1} of {2} ",
emptyMsg: "No records to display",
plugins: [new Ext.ux.PageSizePlugin({editable:false, forceSelection:true})]
})

});


// viewport
new Ext.Viewport({
layout: 'border',
items: [CleanUpFoldersListEditorGrid]
});

});


and this is what my PHP files give back :



{success:true,results:66,rows:[
{"cleanUpFolderID":"2","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\outq\\\\\\\\qprint","fileExtension":"*.*","fileAgeDay":"31","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"3","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\outq\\\\\\\\qlaserums","fileExtension":"*.*","fileAgeDay":"7","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"4","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\outq\\\\\\\\qlaserpdf","fileExtension":"*.*","fileAgeDay":"7","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"5","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\outq\\\\\\\\lham013","fileExtension":"*.*","fileAgeDay":"31","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"6","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\home\\\\\\\\mailatt","fileExtension":"*.*","fileAgeDay":"14","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"7","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"N","cleanUpFolder":"N","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\home\\\\\\\\reaspl","fileExtension":"*.*","fileAgeDay":null,"deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"8","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\home\\\\\\\\pdfspools","fileExtension":"*.*","fileAgeDay":"14","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"9","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\edi\\\\\\\\seagha\\\\\\\\processed\\\\\\\\tul","fileExtension":"*.*","fileAgeDay":"31","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"10","operatingSystem":"as400","connection":"pool_as400_GLOBAL","active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"\\\\\\\\\\\\\\\\as400","folderPath":"\\\\\\\\edi\\\\\\\\seagha\\\\\\\\processed\\\\\\\\transics","fileExtension":"*.*","fileAgeDay":"7","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null},
{"cleanUpFolderID":"25","operatingSystem":"windows","connection":null,"active":"Y","cleanUpFolder":"Y","deleteFolder":"N","cleanUpSubFolder":"N","deleteSubFolder":"N","host":"e:","folderPath":"\\\\\\\\iseriesEDIwatcher\\\\\\\\airplusBRUmanueel\\\\\\\\backup","fileExtension":"*.*","fileAgeDay":"7","deleteFileScanValue":null,"incubateFolder":null,"comments":null,"insID":null,"insDate":null,"insLoc":null,"updID":null,"updDate":null,"updLoc":null}]}

Animal
31 Aug 2010, 4:12 AM
How are you debugging?

Have you checked whether the store is loading correctly, or is firing an exception event?

kurt schrauwen
31 Aug 2010, 4:37 AM
Hai Animal,

It seems that the store is not loading at all ?!

I don't understand that, I have tryed triggering this in a button with ''ds_cleanUpFolders.load();"
But this is till not working

Animal
31 Aug 2010, 4:53 AM
So, do you have an exception listener on the Store?

kurt schrauwen
31 Aug 2010, 5:07 AM
Yes, I added one and it gives "communication failure"

NO I have to figure out why

Thanks,
Animal

Animal
31 Aug 2010, 5:12 AM
With you using a full URL, I would say it's cross domain.

christian130
31 Aug 2010, 5:45 AM
żdo u have a proxy?, because i dont see anything please refer to these examples for u
http://pastebin.com/RA600Pp7