Results 1 to 3 of 3

Thread: Model which loads a single record via its proxy

  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    37
    Answers
    3
    Vote Rating
    4
      0  

    Default 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
    101
      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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    Just use an Ajax request and in callback of it create the Model instance.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •