Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-4401 in a recent build.
  1. #1
    Ext JS Premium Member
    Join Date
    May 2009
    Posts
    41
    Vote Rating
    0
    maksimenko is on a distinguished road

      0  

    Default Problem with panel initially collapsed in a border layout

    Problem with panel initially collapsed in a border layout


    Hi all,

    On a border layout, when a panel is defined initially collapsed (and collapseMode is not set to header), it raises "Uncaught TypeError: Cannot set property 'hidden' of undefined" when trying to expand it.

    The problem is that the panel placeholder gets created on 'placeholderCollapse', but that method doesn't get called if the panel is initially collapsed, so, me.placeholder is undefined on placeholderExpand...

    Here is a simple test case:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <title>testing</title>
                  <link rel="stylesheet" type="text/css" href='ext-4.1-pr1/resources/css/ext-all.css' />
              <script type="text/javascript" src='ext-4.1-pr1/ext-all-dev.js'></script>
                  <script type="text/javascript">
            Ext.onReady(function () {
                Ext.create('Ext.container.Viewport', {
                    layout: 'border',
                    items: [{
                         region: 'west',
                         title: 'test header',
                         collapsed: true,
                         collapsible: true,
                         html: 'test',
                         width: 150
                    }, {
                         region: 'center',
                         html: 'center'
                    }]
                });
                
            });
              </script>
            </head>
        <body>
        </body>
    </html>
    I tried creating an Ext.panel.Panel override with a method 'createPlaceholder' that gets called from placeholderCollapse and placeholderExpand when the me.placeholder is undefined, but, although it creates the placeholder and no error is raised, the placeholder is created with an incorrect width (the full body width)

    Hope it helps

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,142
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Just a FYI... looks like someone has marked this issue as fixed. Not sure who tho
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Jan 2010
    Posts
    3
    Vote Rating
    0
    tscarr is on a distinguished road

      0  

    Default Similar issue with VBox layout and initially collapsed panel

    Similar issue with VBox layout and initially collapsed panel


    I have a similar issue to this whereby I have a top panel collapsible but initially collapsed with a fixed height and a bottom most panel which is not collapsible and takes up the remaining space. I used a vbox layout with a fixed height for the top-most panel and flex: 1 for the bottom-most panel. I have tested with the ExtJs 4.1 Beta 1 release and it appears to be fixed - although this release is too early for us to get into production.

    Would it be possible to get some details of how this issue was resolved so that I can make any necessary overrides in ExtJs 4.0.6 to resolve this in the interim?

  4. #4
    Sencha User
    Join Date
    Jan 2014
    Posts
    1
    Vote Rating
    0
    linuradu is on a distinguished road

      0  

    Default The same problem using ExtJs 4.2.1

    The same problem using ExtJs 4.2.1


    Hello,

    I got also the error: "Uncaught TypeError: Cannot set property 'hidden' of undefined" when trying to expand it."

    In my case, I had another scenario. I used layout border and therefore on my implementation appeared one bug:

    My Example: - appeared bug
    items: [{
    xtype: 'form',
    itemId: 'searchFilterItemId',
    layout: 'border',

    items: [{
    xtype: 'structMaintStatusInformationPanel',
    region: 'north',
    hidden: true
    },{
    xtype: 'structMaintSearchFilterContainer',
    region: 'north',
    margin: '5'
    }]
    }]

    structMaintStatusInformationPanel - expandable panelIn my case, I changed the region property of the second item with center, than works properly.

    Conclusion:;
    In case you will use layout: border, and there are more than one items, than one of them should have the property region: 'center',

    Example: - works properly
    items: [{
    xtype: 'form',
    itemId: 'searchFilterItemId',
    layout: 'border',

    items: [{
    xtype: 'structMaintStatusInformationPanel',
    region: 'north',
    hidden: true
    },{
    xtype: 'structMaintSearchFilterContainer',
    region: 'center',
    margin: '5'
    }]
    }]


    I hope to be helpful
    Radu