1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    23
    Vote Rating
    0
    Answers
    3
    deliriousrhino is on a distinguished road

      0  

    Default Unanswered: Model which loads a single record via its proxy

    Unanswered: Model which loads a single record via its proxy


    In the examples when loading data via a models proxy. You call load and pass a id. load(10)
    http://docs.sencha.com/touch/2-0/#!/...ic-method-load

    This id is then passed as a parameter on the request

    I however just want to load a single request from a server.
    The server does now not require or support the id parameter.

    So I would just like to call load()

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    827
    Vote Rating
    55
    Answers
    84
    jerome76 has a spectacular aura about jerome76 has a spectacular aura about jerome76 has a spectacular aura about

      0  

    Default


    You can try overriding the load function, or use a separate proxy and set the Model data in the response, or using a Store and its load function.

    The id parameter in the function is just to give your Model a unique id, rather than having one automatically generated.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    438
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Just use an Ajax request and in callback of it create the Model instance.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

Tags for this Thread