View Full Version : Data not showing in certain types of Panels with Ajax

11 Dec 2012, 10:37 AM
sorry, but the issue is a bit complicated and longer to explain so here is part of it.

I have an app that has different types of panels (gridpanel, dataview and treepanel). All three panels are supplied with data thru models that have JSONP proxies. In my environment (Mac with Chrome or FF or Safari, XP Pro with Chrome and FF) everything works fine. Now I have one tester with Vista and XP Home who couldn't get any data in any of the above panels.

After some investigation I found the issue which is that for some reasons in these calls (other than Ajax calls) the PHPSESSID was changed to something else but the ID from the locally stored cookie. I still do not understand why but at least it explained why no data was returned from the server (response was based on some info from session storage).

After changing the proxy type to AJAX the issue with the wrong Session ID is resolved, i.e. the correct ID from the cookie is transfered and the JSON responses look good.

Unfortunately this leads to two new problems. But first the good news: for the gridpanel everything works as expected on all platforms and the data is shown in the gridpanel.

Not so for the treepanel and the dataviewer. They remain empty.

When I switch the reader types back to JSONP everything instantly works (except for those Vista guys).

So, any comment or hint or question is much appreciated.

13 Dec 2012, 7:12 AM
If Ajax proxy works, why are you using JsonP then?

13 Dec 2012, 7:19 AM
Well, it looks like i wasn't able to describe the issue in enough detail. So, I try again:

AJAX-proxy does NOT work with treepanel and dataview on any platforms I tested.

JSONP-proxy does NOT work with any panel on certain platforms (wrong session ID).

13 Dec 2012, 7:43 AM
Ok, but what I was getting at is the Ajax request fires without the CORS error from the browser so the request can fire just fine. JsonP should be used for cross origin calls

13 Dec 2012, 10:43 AM
Yes, that was exactly the reason why I wanted to switch everything to AJAX, but unfortunately as I tried to explain the relating Stores and Panels (Treepanel and Dataview) are not supplied with the data that results from the AJAX request.
And as I said: the only difference to when everything works is the proxy type.