Results 1 to 2 of 2

Thread: dataview.List and disclosureProperty error on refresh

Hybrid View

Previous Post Previous Post   Next Post Next Post
    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    39
    Vote Rating
    1
      0  

    Default dataview.List and disclosureProperty error on refresh

    REQUIRED INFORMATIONExt version tested:
    • ST2.0.1
    Browser versions tested against:
    • Chrome
    • Safari 4
    Description:
    • My list has an XTemplate (html), a Store with a Proxy and the plugins 'PullRefresh' and 'ListPaging'.
      I configured my list to use disclosureProperty: "Disclose" and it works fine.
      However when i refresh the store (the list gets the refresh event also) the following error occurs
      Code:
      TypeError: 'null' is not an object (evaluating 'disclosureEl[disclosure ? 'removeCls' : 'addCls']')sencha-touch-all-compat.js:61066
      This breaks the listPaging plugin and the loading-spinner stays visible, the proxy is loaded only one time, before it breaks.
    Steps to reproduce the problem:
    • Define a dataview.list with a disclosureProperty, store, and both list plugins and XTemplate
    • Define a store and proxy
    • Refresh the list using either plugin
    The result that was expected:
    • Working refresh function
    The result that occurs instead:

    • The list errors on UpdateListItem where it is supposed to add or remove the disclosure class.
    Test Case:
    Code:
        var news_template = new Ext.XTemplate('<div class="news_list-item_container">' +
    '<div class="emoticon_state{Status} news_list_image"></div>' +
    '<div class="details">' +
    '<h1>{Title}</h1>' + 
    '<div class="news_list_user"  style="color:black !important">{Username}</div>' + 
    '<div class="news_list_user">{Date}</div>' +
            '</div>' +
    '</div>'
    );
    
    
    
    
    Ext.define('delagelanden.view.News_list', {
        extend: 'Ext.List',
        xtype: 'news_list',
        id: 'news_list',
        
        config: {
            title: 'Rennersverslagen',
            store: 'News',
                    plugins: [
                        {
                            xclass: 'Ext.plugin.PullRefresh',
                            pullRefreshText: 'Pull to refresh...'
                        },
                        {
                            xclass: 'Ext.plugin.ListPaging',
                            autoPaging:     true,
                            loadMoreText:   'Pull up to load more..'
                        }
                    ],
                    pressedDelay : 0,
                    disclosureProperty: "Disclosure",
                    preventSelectionOnDisclose : true, //if user presses the arrow, selection should be prevented
                    itemTpl: news_template,
                    itemId: 'list',
                    onItemDisclosure: true
        }
        
    });
    HELPFUL INFORMATION
    Debugging already done:
    sencha - touch - all - compat.js: 61066TypeError: 'null'
    is not an object(evaluating 'disclosureEl[disclosure ? '

    DOESN'T error when adding <div class="x-list-disclosure"></div> to the template. But this shows the disclosure on ALL items.

    However, data[disclosureProperty] === false shouldn't be false, i config'ed
    disclosureProperty: "Disclosure",
    Code:
    if (disclosure && data[disclosureProperty] === false) {    disclosureEl = extItem.down(me.disclosureClsCache);
        disclosureEl[disclosure ? 'removeCls' : 'addCls'](me.hiddenDisplayCache);
    }
    Possible fix:
    • None
    Operating System:
    Mac osX

    p.s. can send whole project through PM if needed

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Vote Rating
    1290
      0  

    Default

    This is a known bug that has already been opened.

    http://www.sencha.com/forum/showthread.php?203355
    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
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    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
  •