Results 1 to 4 of 4

Thread: can a SimpleStore populate from a url?

  1. #1
    Sencha Premium Member
    Join Date
    Jun 2007
    Posts
    216

    Default can a SimpleStore populate from a url?

    ... or is that not how it's intended? Not doing anything fancy, but want the valueField and displayField to come from a remote source. The examples all use a local (of obvious reasons). Do I have to define a Store obj with a reader and everything?

  2. #2

    Default

    This is how i get the data from sever

    Hope it helps.
    Code:
    var mystore=new Ext.data.JsonStore({
    									autoLoad: true,
    									root:'records',
    									totalProperty:'totalCount',            
    									fields:["id","name"],
    									url:'server url',
    									params: {},
    									id:"id",
    									});
    mystore.load();

  3. #3

    Default

    Reading from a remote source requires a proxy (usually http proxy), and of course a reader for whatever data format chosen (json or xml). JsonStore is of course a preconfigured store that contains an http proxy and a json reader.

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2007
    Posts
    216

    Default

    Thanks, pokerking - that's exactly what I was looking for. I was also looking at the community manual, and there's some examples of more complex data requests. I think it would be helpful if there was an example of what the format of the data sent should be.

    Thanks!

Posting Permissions

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