Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Removing ContentPanel deletes underlying element?

  1. #11
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    What a nightmare to track down. I have a fix, but it required a new config option "preservePanels". In a nutshell what it does is when you remove a panel it resets "ylayout-inactive-content" and appends it to the body. The problem is if the node is not actually part of the document, YAHOO.util.Dom.get returns null and the TabPanel automatically creates a new empty body element for you.

    The default action is to destroy panels on close. In fact, I added a destroy() method to the ContentPanel class that does this. This will probably affect existing code but I think it's the best default action. What do you think?

  2. #12
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    So removePanel(), removed the DOM node, but kept a reference to it?

    Perhaps removePanel could move it to another point in the DOM, but have it hidden.

    It does seem logical that removePanel should not actually destroy the Panel - it should still be perfectly able to receive XHR updates, be manipulated, but still be ready to be re-added and shown.

  3. #13
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    remove by default will destroy it. You can set preservePanels to true on the regions config OR remove takes a 2nd boolean param to individually preserve them.

    Adding them to the body and setting them to ylayout-inactive-content does hide them from view.

  4. #14
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747

    Default

    Jack,

    Thanks so much for jumping on this for me. I also figured it out (dude, I spent like an hour on this!) and just did a quick fix for my purpose. I like your solution, and the default action is ok with me. Is this available now in the RC1 release? Or are you waiting for RC2?

    Thanks again man.

    -Jarred

  5. #15
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    RC2 but I can send you a snapshot if you'd like.

  6. #16
    Ext User
    Join Date
    Mar 2007
    Posts
    287

    Default

    Oops... looks like I've run into the same problem discussed in this thread...
    Will RC2 be up for download soon?

Page 2 of 2 FirstFirst 12

Similar Threads

  1. accessing and updating underlying xml from the grid-Ext 1.0
    By Eric_ht in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 21 Mar 2007, 1:52 PM
  2. Problem removing dialog
    By Nullity in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 27 Feb 2007, 7:01 AM
  3. Removing borders from dialogs
    By gfraser in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 20 Dec 2006, 7:05 PM
  4. Element.removeListener never removing handlers!
    By Animal in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 3 Dec 2006, 5:30 AM
  5. Removing the last tab
    By mohaqa in forum Ext 1.x: Help & Discussion
    Replies: 9
    Last Post: 14 Oct 2006, 9:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •