Threaded View
-
22 May 2012 2:29 AM #1
dataview.List and disclosureProperty error on refresh
dataview.List and disclosureProperty error on refresh
REQUIRED INFORMATIONExt version tested:
- ST2.0.1
- Chrome
- Safari 4
- 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
This breaks the listPaging plugin and the loading-spinner stays visible, the proxy is loaded only one time, before it breaks.Code:TypeError: 'null' is not an object (evaluating 'disclosureEl[disclosure ? 'removeCls' : 'addCls']')sencha-touch-all-compat.js:61066
- 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
- Working refresh function
- The list errors on UpdateListItem where it is supposed to add or remove the disclosure class.
HELPFUL INFORMATIONCode: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 } });
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",
Possible fix:Code:if (disclosure && data[disclosureProperty] === false) { disclosureEl = extItem.down(me.disclosureClsCache); disclosureEl[disclosure ? 'removeCls' : 'addCls'](me.hiddenDisplayCache); }- None
Mac osX
p.s. can send whole project through PM if needed
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote