1. #1
    Ext JS Premium Member
    Join Date
    Jan 2011
    Location
    South Korea
    Posts
    17
    Vote Rating
    0
    heheahn is on a distinguished road

      0  

    Default formpanel in tabpanel

    formpanel in tabpanel


    Need some help with adding a form inside a tabpanel. ( ExtJS 4.0 beta2 )
    forms aren't rendered in Chrome, FireFox, IE9. (except IE8)

    Here's the tab:

    Code:
    var tab = {
              xtype: 'tabpanel',
              defaults: {
                autoHeight: true
              },
              items: [
                {
                  title: 'Normal Tab',
                  items: {
                    id: "form1",
                    xtype: "form",
                    url: '/test.html,
                    items: [ {
                      name: "name",
                      xtype: "textfield",
                      vtype: 'name',
                      fieldLabel: 'test',
                      allowBlank: false
                    }]
                  }
                },
                {
                  title: 'Normal Tab2',
                  items: {
                    id: "form1",
                    xtype: "form",
                    url: '/test2.html,
                    items: [ {
                      name: "name",
                      xtype: "textfield",
                      vtype: 'name',
                      fieldLabel: test2,
                      allowBlank: false
                    }]
                  }
                }
              ]
            }
    
    tab.render(document.body);

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    i never trusted autoHeight. I suggest setting a height.

  3. #3
    Ext JS Premium Member syscobra's Avatar
    Join Date
    Nov 2007
    Location
    Venezuela
    Posts
    140
    Vote Rating
    0
    syscobra is on a distinguished road

      0  

    Default


    I don't see the xtype for the items...
    I think it should be something like this:
    PHP Code:
    var tab = {
              
    xtype'tabpanel',
              
    defaults: {
                
    xtype 'panel',
                
    autoHeighttrue
              
    },
              
    items: [
                {
                  
    title'Normal Tab',
                  
    items: {
                    
    id"form1",
                    
    xtype"form",
                    
    url'/test.html,
                    items: [ {
                      name: "name",
                      xtype: "textfield",
                      vtype: '
    name',
                      fieldLabel: '
    test',
                      allowBlank: false
                    }]
                  }
                },
                {
                  title: '
    Normal Tab2',
                  items: {
                    id: "form1",
                    xtype: "form",
                    url: '
    /test2.html,
                    
    items: [ {
                      
    name"name",
                      
    xtype"textfield",
                      
    vtype'name',
                      
    fieldLabeltest2,
                      
    allowBlankfalse
                    
    }]
                  }
                }
              ]
            }

    tab.render(document.body); 
    Javier Rincón aka SysCobra

Similar Threads

  1. FormPanel into TabPanel
    By luca.santaniello in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 11 Feb 2010, 6:07 AM
  2. Replies: 2
    Last Post: 1 Sep 2009, 11:40 AM
  3. Error: formpanel , tabpanel and formpanel again
    By newname2008 in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 29 Jun 2009, 12:16 AM
  4. FormPanel with TabPanel
    By Westside in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 1 Jul 2008, 11:05 PM
  5. FormPanel with TabPanel
    By christocracy in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 11 Oct 2007, 9:36 AM

Thread Participants: 2