1. #1
    Sencha User
    Join Date
    Sep 2009
    Location
    Istanbul / Turkey
    Posts
    45
    Vote Rating
    0
    hazimdikenli is on a distinguished road

      0  

    Default jsonreader metadata

    jsonreader metadata


    how does jsonreader ask for the metadata, if we do not configure it initially.

    is there a form value or query param indicating that the store is asking for the metadata.

  2. #2
    Sencha User
    Join Date
    Aug 2009
    Posts
    480
    Vote Rating
    1
    plalx has a spectacular aura about plalx has a spectacular aura about

      0  

    Default


    At first load, if there's a metaData property in the response, the store will get configured with it. It's also possible the change the metaData at any time. The store will then get reconfigured with the new provided metaData automatically.

  3. #3
    Sencha User
    Join Date
    Sep 2009
    Location
    Istanbul / Turkey
    Posts
    45
    Vote Rating
    0
    hazimdikenli is on a distinguished road

      0  

    Default


    How is my server going to know if it needs to return the metadata, I dont want to return the metadata on each call, coz I am going to be using this with a remote combo.
    so maybe pass something in baseParams and reset it on metadatachange event?

  4. #4
    Sencha User
    Join Date
    Aug 2009
    Posts
    480
    Vote Rating
    1
    plalx has a spectacular aura about plalx has a spectacular aura about

      0  

    Default


    Yes, you will have to inform your server to add metaData by passing a flag. It doesn't have to be in baseParams tought, you can just pass it when loading for the first time by using a single beforeload listener.

    e.g.

    Code:
    {
        listeners: {
            'beforeload': function(store, options) {
                options.params.metaNeeded = true;
            },
            single: true
        }
    }

  5. #5
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    34
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Or configure your store with

    Code:
    autoLoad: {
        params: {
            metaNeeded: true
        }
    }
    An object autoLoad is used as options to the load() call.

Similar Threads

  1. JsonReader and metaData
    By strimp099 in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 11 Mar 2011, 8:32 AM
  2. JsonReader and metaData section
    By balou in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 13 Oct 2007, 2:54 AM
  3. Reading extra metadata when using JsonReader
    By Cory in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 3 Aug 2007, 3:23 AM

Thread Participants: 2

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar