1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    34
    Answers
    3
    Vote Rating
    2
    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
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      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
    Gainesville, FL
    Posts
    36,632
    Answers
    3452
    Vote Rating
    817
    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


    Just use an Ajax request and in callback of it create the Model instance.
    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.

Thread Participants: 2

Tags for this Thread