-
13 Sep 2008 6:41 AM #1
ContentPanel Collapsible weird behavior
ContentPanel Collapsible weird behavior
Hi There,
I am experiencing some weird behavior with Collapsible ContentPanels.
I add one ContentPanel to a TabItem, simply by instantiating and then
setCollapsible(true);
So far so good. The user can add a second collapsible ContentPanel to the same TabItem.
Now, if the second ContentPanel is collapsed/expanded all is good.
If the first ContentPanel is collapsed/expanded, then also the second one is!!!
It looks like the collapse/expand event is propagated from the first to the second ContentPanel (which is not what it is supposed to do, I think), whereas the it is not propagated from the second to the first (correct behavior, I suppose...).
Ideas?
Thanks,
Francesco
-
13 Sep 2008 6:34 PM #2
got a simple bit of code to demonstrate? could be a bug and if so, will need some code to validate against
-
14 Sep 2008 1:06 AM #3
This the class that creates my ContentPanels (simple stuff, it's just a start)
This is the code that adds PContentPanel to the TabItem in the TabPanelCode:public class PContentPanel extends ContentPanel { public PContentPanel(int type,String id) { super(); setId(id); setHeading("ID : "+getId()+" - Type : "+type); setIconStyle("icon-text"); setUrl("http://www.google.com"); setSize(200, 200); this.setCollapsible(true); Draggable d = new Draggable(this,getHeader()); d.setUseProxy(false); if (getParent() instanceof Component) { d.setContainer((Component)getParent()); } new Resizable(this); } }
Thanks a lot!Code:contentPanel = new PContentPanel(eventType,this.getController().getControllerName()); //This a class that deals with actions of the main TabPanel (Strategy Pattern) mainTabPanelActions = MainTabPanelActions.getInstance(); TabItem item = mainTabPanelActions.getActiveTabItem(); item.add(contentPanel); item.layout();
-
14 Sep 2008 1:49 AM #4
don't set the id on the content panel - wouldn't this make them all the same?
-
14 Sep 2008 5:05 AM #5
No because every ContentPanel has its own unique id (which I am sure of)...
Thanks
-
14 Sep 2008 1:02 PM #6
well, without more code that shows a working example with the problem, it would purely be guessing from here. See if you can create a single working example with no other class requirements (other than gxt) that can demonstrate the bug/issue.
-
14 Sep 2008 10:52 PM #7
I'll try as soon as...
Meanwhile, thanks


Reply With Quote