1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default Direct not working in Architect, but IS working in browser...

    Direct not working in Architect, but IS working in browser...


    I have been using the Direct class system throughout the Architect 2 beta releases. At this point, I am unable to right click a store and "load data" (depending on the time of day, it is either grayed out or returns nothing). But, the stores are still working correctly when I look at the app in a browser, with no console errors.

    Any ideas as to why a store would not work inside of Architect, but does work in a browser?

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    I am assuming you have direct API set correctly in project preferences and you get the message "Successfully updated Ext Direct API".

    If that is true, then the directFn needs to be selected via the list of api available in the directFn config menu.
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default


    Sorry about the lack of details.

    Your assumptions are correct. The API loads correctly and I get a list of directFn in the proxy drop down. After selecting the correct function and adding the correct extraparams, as well as fields in the store and the root in the reader, the store's "load data" still doesn't work within Architect. But, the grid loads just fine in a browser (outside of Architect).

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Do you have url prefix defined? this is so api url can be resolved

    Say if you have api.php which has relative url - 'url'=>'php/router.php'
    Bharat Nagwani
    Sencha Designer Development Team

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Attaching a simple Direct project with Grid using DirectFn to read data
    Attached Files
    Bharat Nagwani
    Sencha Designer Development Team

  6. #6
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default


    I am sad to report that I am experiencing the exact same result with your file. Please see my screenshots below. As you can see, the browser receives the data correctly, the settings are correct in the Architect file, but the "load data" option is still grayed out...


    ScreenHunter_02 Apr. 18 12.49.jpgScreenHunter_04 Apr. 18 12.49.jpgScreenHunter_05 Apr. 18 12.50.jpg

  7. #7
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    That tells me your directFn in direct proxy is not getting eval'ed to a function
    Bharat Nagwani
    Sencha Designer Development Team

  8. #8
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default


    Is that something I can fix?

  9. #9
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Whats your environment like - mac, windows.. and version? And your backend server that you use? It could be due to that. I can try to replicate here.
    Thanks
    Bharat Nagwani
    Sencha Designer Development Team

  10. #10
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    22
    Vote Rating
    0
    terryfritsch is on a distinguished road

      0  

    Default


    Win7. I have attempted this on both IIS, and a Virtual Machine running Turnkey LAMP. I get the same result.

    I have tried deleting the Sencha folder from the [user]/AppData/local/Sencha, Inc/ directory and that does not seem to help.

    I just had a co-worker replicate this issue by creating a new architect file and pointing it to the direct api file. Before saving the file, the 'load data' option is available and works. Upon saving the file, it reverts to the issue I've described. And this is using your files that you've provided on two different systems and server types.