1. #1
    Sencha User joevelardi's Avatar
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    38
    Vote Rating
    0
    joevelardi is on a distinguished road

      0  

    Default Creating a JSON Store using ASP

    Creating a JSON Store using ASP


    Hi,

    I'm wanting to perform a simple test to create a JSON store by having ASP generate the code .. i have generated the ASP code but do not know how to implement this.

    In the code below, i have generated the text in Red as ASP - how do i embed this information ?

    Is there a simpler way of creating a JSON store ?

    Code:
    var  dsExclusions = new Ext.data.JsonStore({
        fields:  [ 'id' ],
         data:   [ { id: 'Department' },
                    {  id: 'Category'     },
                    { id: 'Product'       }]
    });

  2. #2
    Sencha User joevelardi's Avatar
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    38
    Vote Rating
    0
    joevelardi is on a distinguished road

      0  

    Default


    hehe .. I've found a solution thanks to a quick read; the solution I've found is below:

    Code:
    var dsExclusions = new Ext.data.JsonStore({
        fields : ['id'],
        url : 'http://localhost:9090/include/qryExclusions.asp',
        totalProperty : 'totalCount',
        root : 'records',
        autoLoad : true,
        remoteSort : true
    });
    The ASP query will create the following output that can be used by the JSON Store;
    - The url points to the aps script that generates the code
    - totalProperty get the totalCount value which can be used for pagination
    - root point to the records field in the generated code

    Code:
    ({
        totalCount : '999999',
        records : [  
           { id: 'Department' },
           { id: 'Category'   },
           { id: 'Product'    }
        ]
    })

Similar Threads

  1. Change Store Proxy URL without Creating New Store
    By rkdeiss in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Apr 2010, 11:16 AM
  2. Issue with JSON Data Store in ASP
    By Adamw in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 2 Mar 2010, 8:02 AM
  3. Second json store is created under each returned json Store.data.item
    By daddyschmack in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Aug 2009, 4:34 AM
  4. ASP.NET JSON
    By wayne_o in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 22 Oct 2008, 6:27 AM
  5. JSON from ASP
    By djfiii in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Mar 2008, 4:18 AM
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi