1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    48
    Vote Rating
    1
    Answers
    2
    hiroprotagonist is on a distinguished road

      0  

    Default Answered: How to correctly remove generated HTML

    Answered: How to correctly remove generated HTML


    Hi,

    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 e.g. 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.

  2. Hi guys,

    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

  3. #2
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    48
    Vote Rating
    1
    Answers
    2
    hiroprotagonist is on a distinguished road

      0  

    Default solved by ext.fly

    solved by ext.fly


    Hi guys,

    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