Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Answers
    3
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default Unanswered: Data not showing in certain types of Panels with Ajax

    Unanswered: Data not showing in certain types of Panels with Ajax


    Hi,
    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.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,217
    Answers
    3519
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If Ajax proxy works, why are you using JsonP then?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Answers
    3
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default


    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).

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,217
    Answers
    3519
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    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
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Answers
    3
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1

Tags for this Thread