1. #1
    Ext User aldev.web's Avatar
    Join Date
    Jun 2007
    Posts
    43
    Vote Rating
    0
    aldev.web is on a distinguished road

      0  

    Default Remove/Add BorderLayout and reload applet

    Remove/Add BorderLayout and reload applet


    Hello,

    I have one BorderLayout (north and center). In my center part, there is an applet.
    When user change part of menu, i destroy ContentPanel (with preservePanel) and add a new ContentPanel.
    But if i came back on my old ContentPanel my applet is reloaded. I would like applet was hidden and not destroyed/rebuilded.

    Sorry for my English...
    Code:
    			   centerLayout = new Ext.BorderLayout(Ext.get('center'), {
                        north: {
                            split:false,
    						autoScroll:true,
                            initialSize: 179,
                            minSize: 179,
                            maxSize: 179,
                            titlebar: true,
                            collapsible: true,
    						collapsedTitle: 'N\'S3 WebMeeting',
    						preservePanels: true,
                            animate: true
                        },
                        center: {
                            titlebar: false,
    						preservePanels: true,
    						autoDestroy: false,
                            autoScroll:true
                        }
                    });
    Code:
    				case 'X':
                                            //applet is in div AV
    					$('AV').style.display = "block";
    					$('helpMeetingAV').style.display = "block";
    
    					var centerAVPanel = new Ext.ContentPanel(Ext.get('AV'),{
    			            autoCreate:false,
    			            closable:false
    					});
    					var northHelpPanel = new Ext.ContentPanel(Ext.get('helpMeetingAV'),{
    			            autoCreate:false,
    			            closable:false
    					});
    					var activePanel = centerLayout.getRegion('center').getActivePanel();
    					var activeHelpPanel = centerLayout.getRegion('north').getActivePanel();
    					centerLayout.remove('center',activePanel, true);
    					centerLayout.remove('north',activeHelpPanel, true);
    					centerLayout.add('north',northHelpPanel);
    					centerLayout.add('center',centerAVPanel);
    					break;
    			}
    [French]
    Bonjour,

    J'ai mon interface qui est compos

  2. #2
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    can you just hide and show the panel instead of destroying it each time?

  3. #3
    Ext User aldev.web's Avatar
    Join Date
    Jun 2007
    Posts
    43
    Vote Rating
    0
    aldev.web is on a distinguished road

      0  

    Default


    I try to use :
    Code:
    centerLayout.getRegion('center').showPanel(idContentPanelMeeting);
    and
    Code:
    centerLayout.getRegion('center').hidePanel(idContentPanelMeeting);
    but Panels are not displayed in the good region layout. An other code to show and hide panel?

  4. #4
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    That code should show and hide the panel. What do you mean by "Panels are not displayed in the good region layout."?

  5. #5
    Ext User aldev.web's Avatar
    Join Date
    Jun 2007
    Posts
    43
    Vote Rating
    0
    aldev.web is on a distinguished road

      0  

    Default


    First ContentPanel, display is good


    When i show an other ContentPanel (Applet), there is lot of unintentional space between region north and center


    An idea?

  6. #6
    Sencha - Training Team RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Vote Rating
    0
    RWaters is on a distinguished road

      0  

    Default


    People usaully just blur out text and logos, those screenshots aren't so easy on the eyes :P. Anyway, there isn't anything outwardly wrong with the code so far. Can you post what the HTML for the Applet section looks like?

    Also, is the display starting out this way? or is this something that occurs after hiding and showing it?

  7. #7
    Ext User aldev.web's Avatar
    Join Date
    Jun 2007
    Posts
    43
    Vote Rating
    0
    aldev.web is on a distinguished road

      0  

    Default


    If i put this code, i have the bug display on my great screenshots
    Code:
    var northHelpMeetingPanel = new Ext.ContentPanel(Ext.get('helpMeetingMeeting'),{
    	autoCreate:true,
    	 closable:false
    });
    idContentPanelHelpMeeting = northHelpMeetingPanel.getId();
    
    var northHelpWBPanel = new Ext.ContentPanel(Ext.get('helpMeetingWB'),{
    	autoCreate:true,
    	closable:false
    });
    idContentPanelHelpWB = northHelpWBPanel.getId();
    
    var centerCenterPanel = new Ext.ContentPanel(Ext.get('centerFrame'),{
    	autoCreate:true,
    	closable:false
    });
    idContentPanelMeeting = centerCenterPanel.getId();
    
    var centerWBPanel = new Ext.ContentPanel(Ext.get('drawboard'),{
    	autoCreate:true,
    	closable:false
    });
    idContentPanelWB = centerWBPanel.getId();
    .....
    .....
    switch (part){
    	//screenshot 1
            case 'Meeting':
    		$('centerFrame').style.display = "block";
    		$('helpMeetingMeeting').style.display = "block";
    		centerLayout.getRegion('center').showPanel(idContentPanelMeeting);
    		centerLayout.getRegion('north').showPanel(idContentPanelHelpMeeting);
    		break;
            //screenshot2
    	case 'Applet':
    		$('drawboard').style.display = "block";
    		$('helpMeetingWB').style.display = "block";
    		centerLayout.getRegion('center').showPanel(idContentPanelWB);
    		centerLayout.getRegion('north').showPanel(idContentPanelHelpWB);
    		break;
    ......
    If i add this code before switch :
    Code:
    			
    centerLayout.beginUpdate();
    centerLayout.add('center',centerCenterPanel);
    centerLayout.add('center',centerWBPanel);
    			
    centerLayout.add('north',northHelpMeetingPanel);
    centerLayout.add('north',northHelpWBPanel);
    centerLayout.endUpdate();
    All run correctly except applet is not display

Thread Participants: 1

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