watrboy00
26 Sep 2007, 6:31 PM
To give a little context around my problem I will try to explain what I am doing. I have a drop down menu of departments and when one is clicked it loads the department page in a Content Panel. After the Content Panel url is set using .setURL(), I refresh the Content Panel using .refresh(). Once that is complete I use a Data Store and HttpProxy to retrieve a xml list from my server that returns a list of applications I want to append to a toolbar. My problem is that if I call .refresh() the Data Store fails on the callback (sucess always = false). If I comment out the .refresh() line in my code the Data Store works properly.
I have also notice that if I have the .refresh() line commented out but set a default url to load when I create the Content Panel the Data Store fails in the same way.
Now here is another kicker. It works perfectly in IE6 but does not work in FF2. Firebug shows that it made a request to getDepartmentApplicationsXML.asp and returns a valid xml file. (I can also view getDepartmentApplicationsXML.asp in a separate window and pass it the correct params and it works too). I don't get any scripting errors in FireBug either.
I am pulling my hair out on this one. Anyone have any idea? Thanks.
var DepartmentApplications = function() {
var ds;
return {
init: function() {
/*
*
* DEPARTMENTS MENU DEFAULT APPLICATION LIST
*
*/
ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
method: 'GET',
url: 'getDepartmentApplicationsXML.asp'
}),
reader: new Ext.data.XmlReader({
record: 'item'
}, [
{name: 'id', mapping: 'id'},
{name: 'name', mapping: 'name'},
{name: 'shortname', mapping: 'shortname'},
{name: 'url', mapping: 'url'},
{name: 'description', mapping: 'description'}
]
)
});
},
load: function( options ) {
ds.load({
params: {d: options.department },
callback: function(r, options, success) {
if (success == true) {
ds.each(function(r) {
//alert('add');
}, this);
} else if (success == false) {
Ext.Msg.alert("ERROR", "There was an error parsing the departments toolbar data.");
}
},
scope: this,
add: false
});
}
};
}();
I have also notice that if I have the .refresh() line commented out but set a default url to load when I create the Content Panel the Data Store fails in the same way.
Now here is another kicker. It works perfectly in IE6 but does not work in FF2. Firebug shows that it made a request to getDepartmentApplicationsXML.asp and returns a valid xml file. (I can also view getDepartmentApplicationsXML.asp in a separate window and pass it the correct params and it works too). I don't get any scripting errors in FireBug either.
I am pulling my hair out on this one. Anyone have any idea? Thanks.
var DepartmentApplications = function() {
var ds;
return {
init: function() {
/*
*
* DEPARTMENTS MENU DEFAULT APPLICATION LIST
*
*/
ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
method: 'GET',
url: 'getDepartmentApplicationsXML.asp'
}),
reader: new Ext.data.XmlReader({
record: 'item'
}, [
{name: 'id', mapping: 'id'},
{name: 'name', mapping: 'name'},
{name: 'shortname', mapping: 'shortname'},
{name: 'url', mapping: 'url'},
{name: 'description', mapping: 'description'}
]
)
});
},
load: function( options ) {
ds.load({
params: {d: options.department },
callback: function(r, options, success) {
if (success == true) {
ds.each(function(r) {
//alert('add');
}, this);
} else if (success == false) {
Ext.Msg.alert("ERROR", "There was an error parsing the departments toolbar data.");
}
},
scope: this,
add: false
});
}
};
}();