Now that I have completed my app with jQuery Mobile I want to give Sencha Touch another try. I originally stopped working with Sencha in the middle of fall at this exact same problem.
Here's the same of the JSON I am getting back with my server. I can see this is being loaded with Chrome's developer tools:
Code:
[{"nid":"702","node_title":"another test again","users_name":"andorraclaim123","users_uid":"179","node_data_field_description_field_description_value":"Buy my cat","node_type":"push","node_vid":"702","files_node_data_field_image_node_data_field_image_field_imag":"1313","files_node_data_field_image_node_data_field_image_field_imag_1":"1","files_node_data_field_image_node_data_field_image_field_imag_2":"a:11:{s:3:\"fid\";s:4:\"1313\";s:5:\"width\";i:150;s:6:\"height\";i:89;s:8:\"duration\";i:0;s:18:\"audio_bitrate_mode\";s:0:\"\";s:18:\"audio_channel_mode\";s:0:\"\";s:12:\"audio_format\";s:0:\"\";s:13:\"audio_bitrate\";i:0;s:17:\"audio_sample_rate\";i:0;s:3:\"alt\";s:0:\"\";s:5:\"title\";s:0:\"\";}"
Setting up a model....
Code:
Ext.regModel('socializeModel', { fields: [
{ name: 'nid', type: 'string' }, //just getting the first two values
{ name: 'node_title', type: 'string' }]
});
Now let's get the JSON....
Code:
var socializeStore = new Ext.data.Store({
model: 'socializeModel',
storeId: 'socializeStore',
fields: [
'nid',
'node_title'
],
proxy: {
type: 'scripttag',
url: 'http://example.com/services/frontpage.json',
startParam: 'stcCallback1001',
reader: {
type: 'json',
}
}
});
socializeStore.load();
Now let's make a list and insert it into a card panel
Code:
App.views.socialize = new Ext.List({ fullscreen: true,
store: 'socializeStore',
id: 'socialize',
itemTpl: '{nid}'
});
//start main panel
App.views.Socializecard = Ext.extend(Ext.Panel, {
title: "Socialize",
iconCls: "action",
styleHtmlContent: true,
initComponent: function() {
Ext.apply(this, {
dockedItems: [
topbar,
App.views.socialize
]
});
App.views.Socializecard.superclass.initComponent.apply(this, arguments);
}
});
Ext.reg('socializecard', App.views.Socializecard);
})();
All I get is the loading animation tho. My jQuery Mobile app works fine with the same endpoints, requirements, etc. Can anyone provide me with some insight on anything or throw me a bone here? I really want to use Sencha Touch.