Results 1 to 3 of 3

Thread: add array to store

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    73
    Vote Rating
    -1
      0  

    Default Answered: add array to store

    Hey

    I have a problem with adding an array to my store. The problem is when I add the array the store make a new node. To show that in more detail i import a screenshot from the JavaScript debugger.

    JavaScriptDebugger.PNG

    The List view shows the id: "ext-record-33" but that is the wrong data i want to show the data of the array. How I can make that data visible in my List?

  2. In your tpl, you will need to use <tpl> to loop through the array:

    Code:
    itemTpl : '<tpl for="cases"><div>{description}</div></tpl>'

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,026
    Answers
    3976
    Vote Rating
    1367
      0  

    Default

    In your tpl, you will need to use <tpl> to loop through the array:

    Code:
    itemTpl : '<tpl for="cases"><div>{description}</div></tpl>'
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    73
    Vote Rating
    -1
      0  

    Default

    Yes thank you that was working but now the list shows just one item but there should be 2 inside

    List.jpg
    how i can say to the list that every array is an own item in the list?

Tags for this Thread

Posting Permissions

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