1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    sergiy is on a distinguished road

      0  

    Default FormPanel inside TabPanel

    FormPanel inside TabPanel


    I want to try to create a Ext.FormPanel with multi column and nested Layouts inside a TabPanel. The layout is similar to "Form 3" in the example at http://extjs.com/deploy/dev/examples/form/dynamic.html

    For some reason the nested layout appears only after resizing browser window.

    Can you help me with that?

    Thank you.

    Here is the code:

    dynamic.html
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <
    html>
    <
    head>
        <
    meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <
    title>Forms</title>
        <
    link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>

        <!-- 
    GC -->
        <!-- 
    LIBS -->
        <
    script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
        <!-- ENDLIBS -->

        <script type="text/javascript" src="../../ext-all.js"></script>

        <script type="text/javascript" src="states.js"></script>
        <script type="text/javascript" src="dynamic.js"></script>
        <link rel="stylesheet" type="text/css" href="forms.css"/>

        <!-- Common Styles for the examples -->
        <link rel="stylesheet" type="text/css" href="../examples.css"/>
    </head>
    <body>
    <script type="text/javascript" src="../examples.js"></script>

        <div id="tabs1">
            <div id="script" class="x-hide-display">
                <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus.<br/><br/> Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.</p>
            </div>
        </div>


    </body>
    </html> 
    dynamic.js
    PHP Code:
    Ext.onReady(function(){

        
    Ext.QuickTips.init();

        
    // turn on validation errors beside the field globally
        
    Ext.form.Field.prototype.msgTarget 'side';

        var 
    top = new Ext.form.FormPanel({
            
    labelAlign'top',
            
    frame:true,
            
    title'Multi Column, Nested Layouts and Anchoring',
            
    bodyStyle:'padding:5px 5px 0',
            
    width600,
            
    items: [{
                
    layout:'column',
                
    items:[{
                    
    columnWidth:.5,
                    
    layout'form',
                    
    items: [{
                        
    xtype:'textfield',
                        
    fieldLabel'First Name',
                        
    name'first',
                        
    anchor:'95%'
                    
    }, {
                        
    xtype:'textfield',
                        
    fieldLabel'Company',
                        
    name'company',
                        
    anchor:'95%'
                    
    }]
                },{
                    
    columnWidth:.5,
                    
    layout'form',
                    
    items: [{
                        
    xtype:'textfield',
                        
    fieldLabel'Last Name',
                        
    name'last',
                        
    anchor:'95%'
                    
    },{
                        
    xtype:'textfield',
                        
    fieldLabel'Email',
                        
    name'email',
                        
    vtype:'email',
                        
    anchor:'95%'
                    
    }]
                }]
            },{
                
    xtype:'htmleditor',
                
    id:'bio',
                
    fieldLabel:'Biography',
                
    height:200,
                
    anchor:'98%'
            
    }],

            
    buttons: [{
                
    text'Send Message'
            
    },{
                
    text'Cancel'
            
    }]
        });


        var 
    tabs = new Ext.TabPanel({
            
    renderTo'tabs1',
            
    width:450,
            
    activeTab0,
            
    frame:true,
            
    defaults:{autoHeighttrue},

            
    resizeTabs:true,
            
    enableTabScrolltrue,

            
    items: [ {contentEl:'script'title'Short Text'},
                     
    top ]

        });
    }); 
    Attached Images

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    Do people even search?
    There are a number of threads that talk about this, and the need to set "layoutOnTabChange: true" in the tabPanel config.

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    sergiy is on a distinguished road

      0  

    Default


    I'm sorry.
    I've just found the answer.

    http://extjs.com/forum/showthread.ph...3A%27column%27

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    justin.john is on a distinguished road

      0  

    Default FormPanel inside TabPanel Not working in IE 7,8

    FormPanel inside TabPanel Not working in IE 7,8


    I have tested the below code,

    var top = new Ext.form.FormPanel({
    labelAlign: 'top',
    frame:true,
    title: 'Multi Column, Nested Layouts and Anchoring',
    bodyStyle:'padding:5px 5px 0',
    width: 600,
    items: [{
    layout:'column',
    items:[{
    columnWidth:.5,
    layout: 'form',
    items: [{
    xtype:'textfield',
    fieldLabel: 'First Name',
    name: 'first',
    anchor:'95%'
    }, {
    xtype:'textfield',
    fieldLabel: 'Company',
    name: 'company',
    anchor:'95%'
    }]
    },{
    columnWidth:.5,
    layout: 'form',
    items: [{
    xtype:'textfield',
    fieldLabel: 'Last Name',
    name: 'last',
    anchor:'95%'
    },{
    xtype:'textfield',
    fieldLabel: 'Email',
    name: 'email',
    vtype:'email',
    anchor:'95%'
    }]
    }]
    },{
    xtype:'htmleditor',
    id:'bio',
    fieldLabel:'Biography',
    height:200,
    anchor:'98%'
    }],


    buttons: [{
    text: 'Send Message'
    },{
    text: 'Cancel'
    }]
    });




    var templateTabs = new Ext.TabPanel({
    width:450,
    activeTab: 0,
    frame:true,
    defaults:{autoHeight: true},


    resizeTabs:true,
    enableTabScroll: true,


    items: [ top ]


    });

    But the formPanel inside a tabpanel cause error in IE 7,8
    "Unknown runtime error"
    Please help me:-)

Thread Participants: 2

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