1. #1
    Ext User
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    50
    Vote Rating
    0
    young_matthewd is on a distinguished road

      0  

    Default DomHelper creating Panels to Layout but inactive

    DomHelper creating Panels to Layout but inactive


    Using Yahoo Ext 0.33-rc1 and Yahoo 0.11.4 (testing in Firefox 1.5.0.8)...

    With the DomHelper I create 2 panels and add them to the center layout region. There is no underlying HTML reference rather the DomHelper builds the panels on the fly (i assume). Problem is that the panel I want to show is totally inactive. See below.

    Code:
    layout.beginUpdate();
    
    var welcome = YAHOO.ext.DomHelper.append(document.body, {tag: 'div', id: 'welcome', cls: 'ylayout-inactive-content'});
    var welcomePanel = new YAHOO.ext.ContentPanel(welcome, {title: 'Welcome', id: 'welcomePanel', closable: true});
    welcomePanel.setUrl("resources/html/welcome.htm");
    		
    var guide = YAHOO.ext.DomHelper.append(document.body, {tag: 'div', id: 'guide', cls: 'ylayout-inactive-content'});
    var guidePanel = new YAHOO.ext.ContentPanel(welcome, {title: 'Guide', id: 'guidePanel', closable: true});
    
    layout.add('center', welcomePanel);
    layout.add('center', guidePanel);
    
    layout.getRegion('center').showPanel('welcomePanel');
    
    layout.endUpdate();
    Everything gets generated without error but the "Guide" panel is shown and no tabbing is possible to the "Welcome" panel. Any ideas. Have searched the forum without luck. Tried adding autoCreate. No change. Missing some underlying principle.


    Thanks in advance / Matthew

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    The id of a content panel is equal to the id of it's root element. You don't need to supply an id in the config (if you do it is ignored), and you must use the id of the element (or the panel's index) to show the panel.

  3. #3
    Ext User
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    50
    Vote Rating
    0
    young_matthewd is on a distinguished road

      0  

    Default Found the problem

    Found the problem


    type-o did it. mistake of adding the welcome variable as the element reference to the guidePanel.

    Used the DOM Inspector for the first time. . Exactly what I have been looking for. Saw that the 'welcome' id was missing and boom problem solved.

Similar Threads

  1. Links and Layout Panels
    By finco in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 26 Mar 2007, 12:44 PM
  2. Ext.ContentPanel - create inactive
    By andrey.korolyov in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 16 Mar 2007, 5:49 PM
  3. What's x-layout-inactive-content? (newbie question)
    By benkooijman in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 14 Mar 2007, 10:37 AM
  4. scrollbars showing thru panels on layout complex.html in fox
    By winstonford in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 19 Feb 2007, 6:08 AM
  5. hiding border between layout panels
    By wglass in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 13 Feb 2007, 11:17 AM

Thread Participants: 1