Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    pixman is on a distinguished road

      0  

    Default Direct store with API object not load data

    Direct store with API object not load data


    Hello,

    In architect, if i configure the store reader with direct with directfn, or API, architect telle me an error on load datas : Unable to load data from the supplied directFn.

    but in brower all work fine !

    it's really hard to work, without datas !

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Jul 2012
    Posts
    70
    Vote Rating
    8
    honestbleeps will become famous soon enough

      0  

    Default


    Thanks for reporting your issue to us -- would you be able to provide us a bit more information about how to replicate the issue you're having, exactly?

    We'll need to be able to recreate the issue on our end to better assist you.

    Thanks!
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    pixman is on a distinguished road

      0  

    Default


    Hello,
    My direct API is on a server ( not on the same domain ).
    My apache headers are set for enable the cross domain :
    Code:
    Header set Access-Control-Allow-Origin "*"
    Header set Access-Control-Allow-Headers "X-Requested-With , Content-Type"
    Direct api send this datas :
    Code:
    Ext.ns('Ext.app'); Ext.app.REMOTING_API = {"url":"http:\/\/mydomain.local\/direct\/router","type":"remoting","actions":{"Users":[{"name":"getUsers","len":1}]},"namespace":"Ext.app"};
    In architect, i can add the direct api ressource ( green mark appear )


    Now i create a Direct Store ( in project inspector )
    I change the autoLoad property to TRUE,
    I change the reader property "root" and setting to "datas" default is blank.


    Now i configure the Proxy "directfn" property with the combo menu, and choose " Ext.app.Users.getUsers"

    I i click to "load data", i have an error : "Unable to load data from the supplied directFn."

    But if i preview the project in brower, the datas are loaded in the store.


    this is a sample server response for the direct method :

    Code:
    {    "type": "rpc",
        "tid": 1,
        "action": "Users",
        "method": "getUsers",
        "result": {
            "datas": [{
                "id": "1",
                "username": "User 1",
                "email": "email@domain.com",
                "phone": "",
                "company": "",
                "activated": "1",
                "created": "2013-02-05 18:27:46",
                "modified": "2013-02-05 18:27:46",
                "last_login": "2013-02-05 09:55:05",
                "last_service": null,
                "email_validation": "1",
                "creator": "0",
                "last_ip": "192.168.0.10",
                "banned": "0",
                "ban_reason": null
            }, {
                "id": "3",
                "username": "test",
                "email": "test@domain.com",
                "phone": null,
                "company": null,
                "activated": "1",
                "created": "2012-05-24 09:24:08",
                "modified": "2013-02-05 09:46:49",
                "last_login": "2013-02-05 08:46:49",
                "last_service": null,
                "email_validation": "0",
                "creator": "0",
                "last_ip": "192.168.0.10",
                "banned": "0",
                "ban_reason": null
            }, {
                "id": "30",
                "username": "me",
                "email": "me@domain.com",
                "phone": null,
                "company": null,
                "activated": "0",
                "created": "2012-05-24 15:03:46",
                "modified": "2012-05-24 15:03:46",
                "last_login": null,
                "last_service": null,
                "email_validation": "0",
                "creator": "0",
                "last_ip": "127.0.0.1",
                "banned": "0",
                "ban_reason": null
            }, {
                "id": "35",
                "username": "testuser",
                "email": "test.user@domain.com",
                "phone": null,
                "company": null,
                "activated": "1",
                "created": "2012-05-24 15:31:30",
                "modified": "2012-05-24 15:41:03",
                "last_login": null,
                "last_service": null,
                "email_validation": "0",
                "creator": "0",
                "last_ip": "127.0.0.1",
                "banned": "0",
                "ban_reason": null
            }]
        }
    }
    now if i modify my store proxy, and remove directfn, for add api object ( CRUD config )

    the "load datas" menu is disabled, but in preview mode, all work fine !

  4. #4
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    pixman is on a distinguished road

      0  

    Default


    hello,

    i have change my server code from this post : http://www.sencha.com/forum/showthre...or-CodeIgniter

    to the code from this : https://bitbucket.org/mikebranderhor...rect/wiki/Home

    and now in the architect, when i select the directfn, architect write the link to the method like this :

    Code:
    Users.getUsers
    with the previous server code, architect write the method like this :

    Code:
    Ext.app.Users.getUsers
    now, directfn work, but api not.