Results 1 to 6 of 6

Thread: 2 fieldset in a tab panel

  1. #1

    Default 2 fieldset in a tab panel

    hello,

    in my form panel I have a tabpanel, that is composed of two fieldset,
    when i rendered my tabpanel I just have my second fieldset, the first one is destroy and i don't know why ?

    here is my code
    PHP Code:
    var config={
                
    layout:'form',
                
    url:"ajaxAjoutUser.php",
                
    items:[{
                    
    xtype:'tabpanel'
                        
    ,activeItem:0,
                
    layoutOnTabChangetrue
                
                        
    ,border:false
         
                        
    ,deferredRender:false
        
                        
    // tabs
                        
    ,defaults:{
                             
    layout:'form'
                            
    ,defaultType:'textfield'                  
                            
    ,hideMode:'offsets'
                        
    },
                    
                        
    items:[{
                            
    title:"Info Perso",    
                            
    xtype'fieldset',
                                
    checkboxTogglefalse,
                                
    title'Login & mot de passe',
                                
    autoHeighttrue,
                                
    collapsedfalse,
                                
    defaultType'textfield',
                                
    items: [{
                                    
    id"loginUser",...
                                    
                                },{
                                    
    id"mdpUser",
                                    ...
                                }], 
    //end fielset
                            
                            
    xtype'fieldset',
                                
    checkboxTogglefalse,
                                
    title'Informations personnelles',
                                
    autoHeighttrue,
                                
    collapsedfalse,
                                
    defaultType'textfield',
                                
    items: [{
                                    
    id"nomUser",
                                    ...        
                                },
                                {
                                    
    id"prenomUser",
                                    ...                
                                },
                                                 
                                ],
    //end fieldset
                            
    buttons:[{
                                
    text:'Crer'
                                
    ,formBind:true
                                
    ,scope:this
                                
    ,handler:this.submit
                                
    ,buttonAlign:'left'
                            
    }]//end button
                    
    }]//end tab panel
                
    }]//end formpanel
            
    };//end config 
    if someone have an idea ??

  2. #2
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    I hope this will work
    Code:
    var config = {
        layout: 'form',
        url: "ajaxAjoutUser.php",
        items: [{
            xtype: 'tabpanel',
            activeItem: 0,
            layoutOnTabChange: true,
            border: false,
            deferredRender: false,
            defaults: {
                layout: 'form',
                defaultType: 'textfield',
                hideMode: 'offsets'
            },
    
            items: [
                {
                    title: "Info Perso",
                    xtype: 'fieldset',
                    checkboxToggle: false,            
                    autoHeight: true,
                    collapsed: false,
                    defaultType: 'textfield',
                    items: [{
                        id: "loginUser"
                    },
                    {
                        id: "mdpUser"
                    }]
                },// changes i made
                {
                //end fielset
                    xtype: 'fieldset',
                    checkboxToggle: false,
                    title: 'Informations personnelles',
                    autoHeight: true,
                    collapsed: false,
                    defaultType: 'textfield',
                    items: [{
                        id: "nomUser"
                    },
                    {
                        id: "prenomUser"
                    }
                    ],
                //end fieldset
                buttons: [{
                    text: 'Crer',
                    formBind: true,
                    scope: this,
                    handler: this.submit,
                    buttonAlign: 'left'
                }] //end button
            }] //end tab panel
        }] //end formpanel
    }; //end config
    You are setting the title config twice, well that's not the problem over here but still.
    I think the problem with your code is that you were not ending the object config properly.
    Last edited by vishalnnsingh; 5 Jan 2011 at 3:01 AM. Reason: Explanation
    I Meet Challenge with Excitement & My Only Gossip is Love

  3. #3

    Default

    hello and thx for your help,

    the change create 2 tabpanel for my 2 fieldset,
    and i want my two fieldset in one tab panel.

    so i thinck normaly it's possible but here i don't found where is the problem.

  4. #4
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    your items should be a panel then which will contain the fieldset as items. if you still don't get it, then spend sme time with sencha extjs examples.
    I Meet Challenge with Excitement & My Only Gossip is Love

  5. #5

    Default

    ok i found my problem,

    i forgot one Items in xtype tabpanel.

    that's why it didn't work.

    thx for help again

  6. #6
    Sencha User vishalnnsingh's Avatar
    Join Date
    Sep 2010
    Location
    Kolkata, India
    Posts
    115

    Default

    great
    I Meet Challenge with Excitement & My Only Gossip is Love

Similar Threads

  1. How to wrap tab title so that it fits tab width in a Vertical Tab Panel
    By koala.lam in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 21 Oct 2010, 8:39 AM
  2. Replies: 0
    Last Post: 17 Sep 2010, 3:40 AM
  3. Replies: 1
    Last Post: 11 Feb 2010, 2:20 AM
  4. Grid Panel in Fieldset in Tab - Problematic Width
    By rogersja in forum Ext 2.x: Help & Discussion
    Replies: 29
    Last Post: 27 Mar 2009, 11:53 AM

Posting Permissions

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