Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle spreadsheed API with Sencha Touch Ext.List
    primarykey
    data
    text
    <p>I am using Sencha touch 2.1 to build a mobile app. I am trying to load a google spreadsheet as a datasource for a list.</p> <p>I have made the google spreadsheet public you can find it at this link:</p> <p><a href="https://docs.google.com/spreadsheet/pub?key=0AhW0xtL9j2bAdHlwRE1qcE1WdDVLa2dRdDBxNTJBV0E&amp;output=html" rel="nofollow">https://docs.google.com/spreadsheet/pub?key=0AhW0xtL9j2bAdHlwRE1qcE1WdDVLa2dRdDBxNTJBV0E&amp;output=html</a></p> <p>However I am not able to get it working.</p> <p>Here is the code I have so far:</p> <p><strong>The Model</strong></p> <pre><code>Ext.define('MyApp.model.InfoList', { extend: 'Ext.data.Model', config: { fields: [ 'Title', 'Description', 'Icon' ], idProperty: '_id' } }); </code></pre> <p><strong>The Store</strong></p> <pre><code>Ext.define('MyApp.store.InfoList', { extend : 'Ext.data.Store', config : { model : 'MyApp.model.InfoList', proxy: { type: 'jsonp', url : 'https://spreadsheets.google.com/feeds/list/0AhW0xtL9j2bAdHlwRE1qcE1WdDVLa2dRdDBxNTJBV0E/od6/public/basic?alt=json-in-script', reader: { type: 'json', root: 'feed.entry' } } } }); </code></pre> <p><strong>The View</strong></p> <pre><code>Ext.define('MyApp.view.home.infolist', { extend : 'Ext.List', xtype : 'infoListView', disableSelection: true, config : { title : 'Info List', itemTpl: [ '&lt;div class="itemInfo"&gt;', '&lt;div class="iconDiv"&gt;', '&lt;img src="{Icon}" class="icon"/&gt;', '&lt;/div&gt;', '&lt;div class="descriptionDiv"&gt;', '&lt;div class="title"&gt;{Title}&lt;/div&gt;', '&lt;div class="description"&gt;{Description}&lt;/div&gt;', '&lt;/div&gt;', '&lt;div class="disclosureDiv"&gt;', '&lt;img src="images/infoListDisclosure.png" class="iconImage"/&gt;', '&lt;/div&gt;', '&lt;div class="clear"&gt;&lt;/div&gt;', '&lt;/div&gt;', ].join(''), store : 'InfoList' } }); </code></pre> <p>The list is always empty. And if I use jsonp instead of json in the proxy the app stop running.</p> <p>Is there a way to see what is the responce I get from the proxy in an alert? or any indications for what might be the problem is appreciated</p> <p>PS: I building the application on IBM Worklight, but I am using sencha for the codings. I'm not sure if that affects anything</p> <p>Thank you</p>
    singulars
    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.
 

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