View Full Version : preservePanel - allow specifying when adding panel to region
23 Nov 2006, 8:09 PM
Suggestion: in addition to configuring preservePanels in LayoutRegion and via the remove() panel method, it will be great if preservePanel can be overridden and associated with a new panel being added.
23 Nov 2006, 9:17 PM
I'll add a config option to contentpanel as well. :)
24 Nov 2006, 7:25 AM
This is in SVN too. It looks for preserve:true on the content panel as well.
24 Nov 2006, 9:35 AM
Thanks, works great.
Meanwhile, just wondering what is the best means to add a removed panel back into a region.
A simple layout.add('center', panel) works fine... but an extra check is needed to make sure that the panel is not already in the region - question is: how to effectively check if a panel is already present in a region? hasPanel() doesn't seem to work reliably for panels which are nested layouts.
Perhaps an enhancement would be to update LayoutRegion's add() to determine if the panel object already exists, and if so, set it as the active panel.
24 Nov 2006, 11:22 AM
hasPanel should work - what kind of issue are you having?
24 Nov 2006, 8:46 PM
Ah... sorry, my mistake - I was using hasPanel() on the inner layout rather than the nested layout panel itself.
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.