简体   繁体   中英

How to correctly remove generated HTML with Sencha Touch

It seems I am running into issues with the Sencha Touch 2 caching mechanism.

The issue occurs when adding/ removing html dynamically with setHtml method of eg a panel. The html that gets inserted is either a full html table or table rows with cells. The problem occurs when using the Ext.get method, which introduces an Ext-element-xyz id on the element that have been read by code. When removing this element, adding new html, and trying to re-read the information, the cache points to the old element.

I tried to iterate all rows and cells and remove it via destroy method, still no luck. Actually it looks like the references between elements are still cached while the ids have been removed from cache.

Has anybody a hint for me?

Thanks.

in case anybody runs into that issue.

I used Ext.get for retrieving elements from dom. It creates an id for every element that I touched and adds that to the cache. All of these elements must be destroyed explicitely clearing the cache. This is certainly not what I intended, so Ext.fly does solve the issue.

hiro

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM