1. #1
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default collapsed:true, possible bug.

    collapsed:true, possible bug.


    Hi,

    The problem is very easy to reproduce. Just try to add a region to an existing Viewport like this:

    Code:
     Ext.getCmp('ViewPort').add(
                    {
                        region: 'south',
                        id:'viewport-south',
                        collapsible:true,
                        collapsed:true,
                        split: true,
                        height: '20%',
                        minHeight: 50,
                        title: 'x',
                        html: 'South Central'
                    }          
                );
    The whole Viewport becomes a mess. just by setting collapsed to true. IF collapsed is false, everything works great.
    Using Ext with cachefly
    Working on LAMPExt

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,657
    Vote Rating
    584
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    From the docs:

    The regions of a BorderLayout are fixed at render time and thereafter, its child Components may not be removed or added
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2009
    Location
    Rhode Island
    Posts
    225
    Vote Rating
    23
    dmulcahey will become famous soon enough dmulcahey will become famous soon enough

      0  

    Question


    I thought they were made dynamic in 4.1. Don presented this info at senchacon. See the border layout section of the linked slide set...

    www.slideshare.net/senchainc/ext-js-41-layouts-performance-and-api-updates

  4. #4
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,506
    Vote Rating
    287
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Agreed. Adding regions like this is listed in the 'Other Goodies' section of the blog post discussing what to expect from 4.1:

    http://www.sencha.com/blog/whats-new-in-ext-js-4-1/

  5. #5
    Sencha User mysticav's Avatar
    Join Date
    Mar 2007
    Location
    Mexico
    Posts
    474
    Vote Rating
    5
    mysticav is on a distinguished road

      0  

    Default


    Exactly. I also read that adding components dynamically to Border Layout was one of the hottest features of 4.1.

    Border Layout
    In the process of working on layouts, border layout in particular benefited from some internal restructuring. It has always been a very popular layout, but it has also suffered from some long-standing limitations:

    You could only have one region that is north, south, east or west. If you needed multiple south regions, you needed to use nested border layouts.
    You could not configure the layout such that an east or west region had priority over a north or south region. To achieve this, again, you needed to use nested border layouts.
    Components could not be added to the container after creation.
    Components could not be removed from the container after creation.
    The point is that adding components (regions) actually works. Yes, I can add components dynamically. The only problem is that setting "collapsed:true" gives a rendering problem.

    Fixing that issue, everything will work as expected.

    I hope some of you guys give me a more detailed explanation.

    Thanks.
    Using Ext with cachefly
    Working on LAMPExt

Thread Participants: 3