1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    46
    Vote Rating
    0
    navvn is on a distinguished road

      0  

    Exclamation Change root for JSON store

    Change root for JSON store


    Basicly what i want to achiev
    I have json that look like:

    info {
    array
    }
    comments {
    array
    }
    success: true

    First i want to use DataView that use data stored in info
    PHP Code:
    var tempTicket = new Ext.data.JsonStore({
                
    url'/tickets/card/id/'+sel.get('ticket_id'),
                
    root'info',
                
    fields: [
                    
    'ticket_id'
                    
    'subject'
                    
    'created_date'
                    
    'assignedto_usr_name',
                    
    'status',
                    
    'content'
                
    ]
            });
    tempTicket.load(); 
    That how JsonStore looks like.

    But i would like to use data stored in comments and display them as a grid.
    If i add second store with diferent root i have 2 requests to server.
    Is there anyway to define rot folder after data is loaded? Something like:

    PHP Code:
    var tempTicket = new Ext.data.JsonStore({
                
    url'/tickets/card/id/'+sel.get('ticket_id')
            });
    tempTicket.load(); 
    PHP Code:
    new Ext.DataView({
                        
    storetempTicket({rootinfo}),
                        
    tplticket_preview_tpl,               
                        
    emptyText'No records'
                    
    }) 

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750
    Vote Rating
    9
    fay will become famous soon enough fay will become famous soon enough

      0  

    Default


    Have you looked at this post?

Similar Threads

  1. Problem getting nested Json in Store (different root for each Model)
    By nerdbert in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 3 Dec 2010, 6:48 AM
  2. Replies: 6
    Last Post: 1 Apr 2009, 8:12 AM
  3. Dynamic changing JSON store root
    By sistasi in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 9 Apr 2008, 2:49 AM

Thread Participants: 1

Tags for this Thread

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