Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to access store value in sencha touch
    primarykey
    data
    text
    <p>I am trying to get store value like this:</p> <pre><code> itemtap : function(list, index, target, record) { Ext.getStore("nameStore").load(); console.dir("TEST-&gt;"+record.get('id')); console.dir("TEST-&gt;"+record.get('address')); } </code></pre> <p>Here I cannot get id, when itemtap. and I also try this:</p> <pre><code> var store= Ext.getStore('nameStore'); console.dir("TEST-&gt;"+store.get('id')); console.dir("TEST-&gt;"+store.get('address')); </code></pre> <p>But could not get data. Why this?</p> <p>and <strong>What is the difference between this, two type of store value access?</strong></p> <p>I add onclick inside the div, itemtap working fine but in Iphone it is not working? why this? Is there any alternative is present in sencha working both android Iphone and others.How to get value in itemptap, from displayed in div which is display from store.</p> <p><strong>Edited:</strong></p> <pre><code> itemtap :function(list, index, target, record) { console.log("Clicked---"+record.get('cat_id')); } </code></pre> <p>Actually, I am not getting above code. </p> <p>I am try this, and getting value</p> <pre><code>console.log("Clicked--"+record.data.data[index].cat_id); </code></pre> <p>Getting first value always, because index value always 0, every category tapped. So, Here I want get index of tapped category.</p> <p><strong>Works Fine, If i do this:</strong></p> <pre><code>{ xtype: 'list', itemId: 'catList', scrollable: false, data: [ { name: 'A', cat_id: 1}, { name: 'B', cat_id: 2}, { name: 'C', cat_id: 3}, { name: 'D', cat_id: 4}, { name: 'E', cat_id: 5}, ], loadingText: "Loading Words...", emptyText: '&lt;div&gt;{message}&lt;/div&gt;', autoLoad:true, itemTpl:[ '&lt;tpl for="."&gt;', '&lt;span &gt;{name}&lt;/span&gt; ', '&lt;/tpl&gt;', ] }, </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload