Results 1 to 2 of 2

Thread: list didnt render on 2nd time while using listpaging

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Vote Rating

    Default list didnt render on 2nd time while using listpaging

    I have a application in sencha 1.1 that on start up shows list like login, register, view dispensaries etc. when i click on view dispensaries the store loads and pulls json data from server that is fine, now when i click on Load More button using list paging plugin it loads next 10 records that is also ok. Now problem is this that if i go back to home view or some other view and then again go back to View dispensaries the store actually loads but didnt render the list, even if you wait for 10 mins but if i change my device orientation to landscape the list appears and shows the normal behavior. So my point is whats i am doing wrong that after using list paging and then again loading the list store the list didn't appear until i change my device orientation. Here is my code. Note if i didnt use listpaging plugin the list works fine on every call but the problem starts when i clicked 2 to 3 times on load more. Here is my code.

    Ext.regModel('DispensaryList', {
             fields: [
                {name: 'id', type: 'int'},
                {name: 'name', type: 'string'},
                {name: 'address', type: 'string'},
     var Dispdata = new{
            model  : 'DispensaryList',
            storeId: 'dispensary_store',
            clearOnPageLoad: false, 
           proxy: {
                type: 'ajax',
                id: 'disp_data_url',
                url: '',
                reader: {
                    type: 'json',
                    root: 'results',
                    totalProperty: 'total'
            getGroupString : function(record) {
                if (record && {
                    return record.get('name_full');
                } else if(record &&{
                    return record.get('medname');
                else {
                    return '';
            listeners: {
                'load': function (t, r, s) {
                        controller: abc.controllers.desplist,
                        action: 'loaded',
                        records: r
                'beforeload': function (store, option){
                        controller: abc.controllers.desplist,
                        action: 'beforeloaded',
                        records: option
            pageSize: 10
    abc.views.despList = new Ext.List({
            id: 'despList',
            layout: 'fit',
            fullscreen: true,
            emptyText: '<p class="no-searches">No record found.</p>',
            cls: 'bg_list',
            grouped: true,
            itemTpl : '<div class="disp_list_img">{name_full}</div>',
            store: Dispdata,
            singleSelect : true,
            disableSelection: true,
            //itemSelector : '',
            plugins: [
                    ptype: 'pullrefresh',
                    refreshFn: function(callback, plugin) {
                        console.log( 'me1' );
                       Dispdata.load(function(records, operation, success) {
                            console.log( 'me3' );
                    ptype: 'listpaging',
                    autoPaging: false,
                    onPagingTap : function(e) {
                        if (!this.loading) {
                            this.loading = true;
            onItemDisclosure: function (list, index, itm, event) {
                itemtap: function(list, index, itm, event){
                    var view_val = Ext.getCmp("disp_top_title").disp_view_val;
                    getDispDetail(list, index, itm, event, view_val);
    abc.views.DispListContainer = new Ext.Panel({
            id: 'DispListContainer',
            layout: 'fit',
            dockedItems: [abc.views.DispTopToolbar,abc.views.DispMiddleToolbar,abc.views.DispBottomToolbar],
            items: [abc.views.despList]
    On Clicking view dispensaries here is the code

    Ext.getStore("dispensary_store").proxy.url =  dynamic url;
    Ext.getCmp("disp_top_title").disp_view_val = 'Dispensary';
    abc.views.viewport.setActiveItem('DispListContainer', {type: 'slide', direction: 'left'});
    Last edited by mitchellsimoens; 9 Apr 2012 at 6:21 AM. Reason: added [CODE] tags

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    There isn't anything here that shouts that it is breaking things.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts