PDA

View Full Version : time to long for loading pages in ST1



bia
24 Sep 2014, 5:23 AM
If I have a book and the pages are too many ...and the time to load is too big ...
In Sencha touch 1

The page are loaded in the model below using proxy url:

Ext.regModel('Pages', {
fields: [
{
name: 'issue_id',
type: 'int',
},
{
name: 'text',
type: 'int',
},
{
name: 'url',
type: 'str',
},
{
name: 'filename',
type: 'str',
},
{
name: 'image_url',
type: 'str',
},
{
name: 'image_hd_url',
type: 'str',
},
{
name: 'thumb_url',
type: 'str',
}
],

associations: [
{
type: 'belongsTo',
model: 'Viewer',
},{
type: 'hasMany',
model: 'Links',
name: 'Links'
}
],

proxy: {
type: 'ajax',
url: 'http://abc.net/io/lib.php?cid='+App.client_id+'&pid='+(App.getParameterByName('pid')?App.getParameterByName('pid'):App.pid)+'&lang='+((App.getParameterByName('lang')) ? App.getParameterByName('lang') : 'francais'),
reader: {
type: 'xml',
root: 'pagination',
record: 'page'
},
id: 'pages'
}
});


Or should I change the proxy url at some point?
I that is a method setProxy for a Store [+ load method]...but not for a model...

To try to load page by page? What advice can you give me? I'm new in ST1.


Thanks in advance.
Bia

mitchellsimoens
24 Sep 2014, 5:23 AM
Please post in the correct forum. This forum is for Sencha Fiddle whereas your question is for Sencha Touch 1 which are completely different things.