1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    20
    Vote Rating
    0
    ogradyjd is on a distinguished road

      0  

    Default [2.2][CLOSED] Removing panel from Accordion layout leaves undead panel html in dom

    [2.2][CLOSED] Removing panel from Accordion layout leaves undead panel html in dom


    The code is in this thread over in ext:help:

    http://extjs.com/forum/showthread.php?t=54759

    I tested on Firefox 3.x and IE 7.x - same behavior, which is:
    1. Have a basic panel with an accordion layout containing two or more panels.
    2. Remove one of the panels and add another, calling doLayout like everyone tells you to.
    3. Click on Accordion panel headers to minimize them all, and be amazed to find the panel you removed in a ghost-like state where its header only sometimes respects being visible in the accordion layout while expanding and collapsing other members of the panel.
    A visual check is to use Firebug to stop at a break point just after the call to "doLayout", and dive down into the accordion panel's object model like so: "accordionPanel.body.dom.childNodes" and you'll see the removed component still listed alone with the one you just added.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    This is not a bug:
    1. Removing a component from a container without destroying it won't remove the component from the DOM. Either hide the component or move the component element to another place in the DOM.
    2. Destroying a component (e.g. while removing it from a container) will invalidate the component, so it can't be reused. You will have to recreate the component before you can add it to a container again.

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    20
    Vote Rating
    0
    ogradyjd is on a distinguished road

      0  

    Question


    If what you're saying is true, then you've a problem.

    If removing a component without refreshing the DOM has the effects it does, why do you offer the remove function with the [Boolean autoDestroy] argument? Obviously, anyone setting autodestroy to false is going to get the same ghosting of components that I'm getting, so the question is: Is the behaviour of not removing the component from the DOM the bug, or is the public remove function with the autoDestroy argument the bug?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    As I already said:

    You have 2 options if you remove a component from a container without destroying it:
    1. Hide the component (your example should be using this option).
    2. Move the component to a different location in the DOM (e.g. when moving a component from one container to another).

  5. #5
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,828
    Vote Rating
    609
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Condor is spot on, the reason why the autoDestroy option is there is that you may wish to reuse the component at some point. Since you're explicitly setting autoDestroy to false, we're going to assume you will either:

    a) Hide it yourself
    b) Add it to another container
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  6. #6
    Sencha User
    Join Date
    Jan 2009
    Posts
    61
    Vote Rating
    1
    bartonjd is on a distinguished road

      0  

    Default


    SO if you hide it before calling remove it should work correctly once you add and show it elsewhere?

  7. #7
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    That depends on the layout of the new container. Some layouts will move the component element to the new location, but some won't (in which case you will have to do it yourself).

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi