Results 1 to 10 of 10

Thread: search field disappear

  1. #1
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Default search field disappear

    Hello

    I'm converting my web app from ext 2.2 to ext3.0 (rc 1.1), it was quite easy but I have this problem: in the west panel of my viewport I have an accordion layout with a tree in each panel. Each trees has a toolbar with a searchfield (http://extjs.com/deploy/ext-3.0-rc1/...SearchField.js) and some simple buttons.

    The tree on the first panel (which is expanded at the beginning) is correctly rendered but when I expand the other panel of the accordion, the second tree is shown but the searchfield in its toolbar is not displayed (the buttons are shown).

    I tried to set hideMode="offsets" or call doLayout on "show" but nothing changed.
    If I use vbox layout instead of accordions both the searchfield are correctly shown; all my code did perfectly work on ext2.2

    Any hint?
    Thanks in advance

  2. #2

  3. #3
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Wink

    Yes,
    My code is much longer and full of irrelevant data...the relevant snippets are below.

    Toolbar and tree (both trees have similar configuration), only their stores are different
    PHP Code:

    myTree 
    =  Ext.extend(  Ext.Panel , {   

        
    initComponent: function (  ) 
        {
              
    this.tbar = new Ext.Toolbar ({
                    
    items   : [
                            new 
    Ext.app.SearchField({
                            
    width           190 ,
                            
    storethis.ds
                        
    }), 
                  {    
    text        "",   
                        
    icon        WebRoot 'content/images/default/layout/ns-collapse.gif',
                        
    handler     : function(){ this.tree.collapseAll(); }.createDelegate(this)
                    },{
                       
    text        ""
                        
    icon        WebRoot 'content/images/default/layout/ns-expand.gif',
                        
    handler     : function(){ this.tree.expandAll(); }.createDelegate(this)
                    },{
                        
    text        "",  
                        
    iconCls     "icon-showAll",
                        
    handler     this.hideAllPushpins.createDelegate(this)
                    }] 
                })
             
            
    //init the tree
            
    this.tree = new Ext.tree.TreePanel({
                
    animate         true
                
    rootVisible     false,
                
    enableDD        true,
                
    preloadChildren true,
                
    stateful        true,
               
    containerScroll true,      
                
    dragConfig      : { hlColor:'#fff' },
                
    allowContainerDrop  false
                
    allowParentInsert   false ,
                
    appendOnly          true,
                
    tbarthis.tbar
            
    });
    }) 
    Viewport:


    PHP Code:

    this
    .northPanel = new Ext.Panel({ region'north'bordertruecontentEl'header'height50 });
            
    this.westPanel = new Ext.Panel({ region'west',   id'westPanel'splittruewidth300bordertruelayoutConfig: { renderHidden:true },
                
    collapsibletruetitlebarfalseminSize300maxSize400title' 'layout:   'accordion'
            
    });

             
    this.southPanel = new Ext.Panel({ region"south"id'southPanel'title" "height160splittruecollapsibletrue,
                
    titleCollapsetruecollapsedtruecmargins'0 0 0 0'minSize120maxSize300layout'fit',
                
    items: new Ext.TabPanel({})
            });
          
            
    this.mapPanel = new Ext.Panel ({ region"center"contentEl'centerPanelDiv'splittrue });
                    
          
            
    this.centerPanel = new Ext.Panel({ layout'border'region"center"bordertrue,
                
    items: [this.mapPanelthis.southPanel]
            });

      
    this.mainPanel = new Ext.Panel({ region"center"layout"fit"
                
    items: [{
                    
    layout"border",
                    
    items: [this.centerPanel,  this.westPanel ]
                }]
            });

            
    mapViewPort = new Ext.Viewport({
                
    layout'border',
                
    items: [this.northPanelthis.mainPanel]
            });

    //ContactTree and PlacemarkTree are extensions of ext.panel which contains one tree as defined above 

            
    contactTree = new  myTree ();
            
    placemarkTree = new myTree ();
            
            
    this.westPanel.insert(0contactTree.tree);
            
    this.westPanel.insert(1placemarkTree.tree);
            
    contactTree.tree.expand();
            
    this.westPanel.doLayout(); 

  4. #4
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Unfortunately hideMode:'offsets' doesn't work for Accordion layout (see bugreport).

    But that doesn't explain why it does work on Ext 2.2...

  5. #5
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    Have you tried abstracting the component into a vanilla page to see where the problem is?

  6. #6
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Default

    Quote Originally Posted by Condor View Post
    Unfortunately hideMode:'offsets' doesn't work for Accordion layout (see bugreport).

    But that doesn't explain why it does work on Ext 2.2...
    With Ext2.2 I did not change hideMode (which therefore has the default value) and I got no problems at all

  7. #7
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Default

    Quote Originally Posted by [email protected] View Post
    Have you tried abstracting the component into a vanilla page to see where the problem is?
    I will asap. Thanks!

  8. #8
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Default

    I just created a simple page with essential elements to see the problem with the toolbar of the collapsed panel.

    The page is here:
    http://www.get2getr.com/test.html

    As you can see there's no search field displayed in the tree 2.
    Any idea?!

  9. #9
    Sencha User
    Join Date
    May 2007
    Posts
    52

    Default

    ....really, no ideas? :|

  10. #10

    Default

    did u solve your problem with this search function?

    I have the same problem...
    no error at debug, but also no searchbox, no search button shown...

    any ideas???


    Quote Originally Posted by dario View Post
    ....really, no ideas? :|

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •