We are using the ListPullPager plugin to fetch data for a list that mimics apple's ical list view.

We can't just use the built in page num / start / limit to fetch our store proxy data becaue we are fetching appointments that:
-need to try and fetch at least 25 appointments or max 1 year in future
-can't just fetch next 25 because it might only cut of end part way through a day which wouldn't make sense to our users (we need to fetch at least 25, then as many more as till end of the day)
-can't return a blank set of appointments if there are more in the future because then the user might not think there are any in the future even though there are ... if less than 25 we keep fetching each week in the future until we either hit 52 wks or get 25 appts
-because we are often returning more than 1 week/page at a time we can't just use the auto-incrementing next-page


Our php returns our appointment data, along with how many weeks(pages) it returned as an additional json field.

Because we need to be able to load future as well as previous appointments and keep our place for each we need to be able to use both negative(previous) and positive(future) values.

So, to achieve this we would like to store some data in the listener of our store based on what is returned by our proxy reader

Our store (with some extras removed for simplicity):

Code:
var store = new Ext.data.JsonStore({
     model : 'Booking',
     proxy: {
        type: 'ajax',
        url: 'includes/get_appointments.php',
        extraParams: {
            req_start: '1295251200',
            req_end: '1295856000',
            stylist_id: '3',
        },
        reader: {
            type: 'json',
            root: 'events'
        }
     },
     listeners: {
            load:function(store, records, success) {                        
                for (var i = 0; i < records.length; i++){

                    if(store.proxy.reader.rawData.prev_page_num == undefined)
                    {
                        //-------------------------------------------------------------------//
                        //------------------- STORE RETURNED VALUE HERE SOMEHOW ------------//
                        store.add({"prev_page_num": store.proxy.reader.rawData.prev_page_num});
                    }
                    else
                    {
                        //-------------------------------------------------------------------//
                        //------------------- STORE RETURNED VALUE HERE SOMEHOW ------------//
                        store.add({"next_page_num": store.proxy.reader.rawData.next_page_num});
                    }
                    
                }
            }
     }

We would the like to retrieve the data from the store in our list, so that we can pass it along as a page value to the store's proxy to load new data

Our list (with some extras removed for simplicity):

Code:
var list = new Ext.List({
store: store,
plugins: [new mobile.plugins.ListPullPager({
    previousFn: function(cb,scope){
            //-------------------------------------------------------------------//
            //------------------- RETRIEVE STORED VALUE HERE SOMEHOW ------------//        
            var prev_page_num = store.prev_page_num
        store.read({
            page: prev_page_num - 1,
            addRecords: true
        });
        cb.call(this);
    },
    nextFn: function(cb,scope){
            //-------------------------------------------------------------------//
            //------------------- RETRIEVE STORED VALUE HERE SOMEHOW ------------//        
            var next_page_num = store.next_page_num            
        store.read({
            page: next_page_num + 1,
            addRecords: true
        });
        cb.call(this);
  }
})]
          
});
Thanks so much for any assistance you can offer.

Cheers