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

      0  

    Default Answered: Dumping data from store to panel HTML

    Answered: Dumping data from store to panel HTML


    What is the best way to take data from a store with a model and output it to a panel?

    I have been trying to access the store outside the definition of the panel and save the contents to a variable that could be used within the panel, but I am having no luck. Assuming I know the field to pull out of the store and there is only one record, what is the best way to get that?

  2. To find a specific record from a store using the value of a know field I use:
    Code:
    var record = store.getAt(store.find('MY_FIELD', 'given_value'))
    That will give me the record itself.
    If then I need a value from that record stored in a variable I can get it using:
    Code:
    var str = record.get('THE_FIELD_I_AM_INTERESTED_IN')
    If that is a string I can update a panel's body with the panel's update() method:
    Code:
    panel.update(str)
    Does that help?

  3. #2
    Sencha User
    Join Date
    Dec 2009
    Location
    Enschede, The Netherlands
    Posts
    327
    Answers
    16
    Vote Rating
    13
    flanders will become famous soon enough

      0  

    Default


    I have no idea really what you want to achieve precicely.
    If your question is related to displaying the record(s) you could take a look at forms, grids and or dataviews.
    But it sounds like you need to access an store inside an method of an panel? In that case you do need an reference. Maybe you can pass it at creationtime or you can use the new StoreManager. Maybe if you post some code helping is easier?

  4. #3
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,900
    Answers
    369
    Vote Rating
    176
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    To find a specific record from a store using the value of a know field I use:
    Code:
    var record = store.getAt(store.find('MY_FIELD', 'given_value'))
    That will give me the record itself.
    If then I need a value from that record stored in a variable I can get it using:
    Code:
    var str = record.get('THE_FIELD_I_AM_INTERESTED_IN')
    If that is a string I can update a panel's body with the panel's update() method:
    Code:
    panel.update(str)
    Does that help?

Thread Participants: 2

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