|
I'm trying to use sencha touch's listpaging plugin. But there is almost no good( or bad ) documentation about how to use it and i'm confused. When i activate the plugin in my list
a 'Load More' text and a loading image is added to the end of the list. But i don't know how to configure my store to enable this plugin to be able to load more data.
How can i configure my store so when i tap "Load more", the store brings up page 2 and add them to the list automatically?
| |||
|
Was this post useful to you?
|
|
0
|
I'm having problems finding good documentation, too, but I can at least answer your question. You need to add
}); My outstanding issues that I'm looking into are:
Good luck! | ||||||
feedback
|
|
0
|
Remember also that this works only server side currently. Forum thread http://www.sencha.com/forum/showthread.php?105193-Store-pageSize | ||
|
feedback
|
|
0
|
I've had a similar issue with the ListPaging plugin in SenchaTouch 2, and managed to sort out the 'load more' message behaviour when the end of the data set is reached. This builds on what John Gordon has come up with (regarding specifying the
In the view, where we specify the plugins, we can override the 'load more' and 'no more records' messages:
The issue is that while our web service returns an array of records for a particular page, there is no overall total count property, which is needed for the plugin to determine when all records have been loaded. Hence as it is, the 'Load more' message will remain (issue #1 in the accepted solution). So in the
In the handler, we realise that we've reached the end of the data set when the number of records returned is less than the page size. If the total record count is a multiple of the page size, the last 'page' will have an empty array. Once the end of the data set has been identified, we update the
Because this is a 'before' event handler, this property will be crucially updated before the plugin decides whether to display the 'load more' or 'no more records' messages. Unfortunately, the framework doesn't provide a means to hide the 'no more records' message, so this would have to be done via CSS. Hope this helps. | ||||||
feedback
|

2947








