1. #1
    Sencha User francescoNemesi's Avatar
    Join Date
    Apr 2007
    Location
    London (UK), Milan (ITA)
    Posts
    148
    Vote Rating
    0
    francescoNemesi is on a distinguished road

      0  

    Default 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

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    got a simple bit of code to demonstrate? could be a bug and if so, will need some code to validate against

  3. #3
    Sencha User francescoNemesi's Avatar
    Join Date
    Apr 2007
    Location
    London (UK), Milan (ITA)
    Posts
    148
    Vote Rating
    0
    francescoNemesi is on a distinguished road

      0  

    Default


    This the class that creates my ContentPanels (simple stuff, it's just a start)

    Code:
    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);        
        }    
    }
    This is the code that adds PContentPanel to the TabItem in the TabPanel

    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();
    Thanks a lot!

  4. #4
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    don't set the id on the content panel - wouldn't this make them all the same?

  5. #5
    Sencha User francescoNemesi's Avatar
    Join Date
    Apr 2007
    Location
    London (UK), Milan (ITA)
    Posts
    148
    Vote Rating
    0
    francescoNemesi is on a distinguished road

      0  

    Default


    No because every ContentPanel has its own unique id (which I am sure of)...

    Thanks

  6. #6
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    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.

  7. #7
    Sencha User francescoNemesi's Avatar
    Join Date
    Apr 2007
    Location
    London (UK), Milan (ITA)
    Posts
    148
    Vote Rating
    0
    francescoNemesi is on a distinguished road

      0  

    Default


    I'll try as soon as...

    Meanwhile, thanks

Thread Participants: 1