Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    8
    Vote Rating
    0
    samos is on a distinguished road

      0  

    Default Accordion in FormPanel

    Accordion in FormPanel


    Hello everybody,

    I have a problem :

    I have an accordion in a FormPanel (one for each language), but if i don't expand all, something like that :

    for(var i = 0; i < this.languages.length; i++)
    Ext.getCmp("languagePanel" + i).expand ();

    textFields inside the accordion panel are not rendered then when i submit the form i don't get values..

    So my question is very easy, how to do without this orific trick ?

    Thanks to all,

    Samuel

  2. #2
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    18
    Vote Rating
    0
    dracofyre is on a distinguished road

      0  

    Default


    I don't know the answer to your problem of using the accordionpanel to make everything rendered, but if you need to have fields be collapsed in a form panel couldn't you just use a FieldSet to accomplish this?

    Like for example:
    Code:
     var form = {
       xtype: 'form',
        title: 'blah',
        items: [
               {
                   xtype: 'fieldset',
                  collapsed: true,
                 collapsible; true,
                 items: [
                      {
                         fieldLabel: 'Textfield 1',
                         xtype: 'textfield'
                      }
                 ]
             },
               {
                   xtype: 'fieldset',
                  collapsed: true,
                 collapsible; true,
                 items: [
                      {
                         fieldLabel: 'Textfield 2',
                         xtype: 'textfield'
                      }
                 ]
             }
        ]
    };
    with the above the fields should be sent with the post regardless of whether the fieldset was ever expanded.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    8
    Vote Rating
    0
    samos is on a distinguished road

      0  

    Default Doesn't work

    Doesn't work


    This is the hierarchy :

    FormPanel
    -> layout:'border'
    -> layout accordion
    -> Fieldset
    -> Textfields

    Textfields are not rendered.

    Samuel

  4. #4
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    18
    Vote Rating
    0
    dracofyre is on a distinguished road

      0  

    Default


    Samuel,
    I don't understand reply. A panel can only have 1 layout. It can't be both a border and an accordion layout. I put together a working example of a form that has collapsed fieldsets initially that when you click the submit button it sends all fields down.

    Code:
    Ext.onReady(function(){
        var win;
        var button = Ext.get('show-btn');
    
    
        button.on('click', function(){
            // create the window on the first click and reuse on subsequent clicks
            if(!win){
                win = new Ext.Window({
                    applyTo:'field-win',
                    layout:'fit',
                    width:500,
                    height:300,
                    closeAction:'hide',
                    plain: true,
    
    
                    items: {
                        xtype: 'form',
                        url: 'test.htm',
                        defaultType: 'fieldset',
                        defaults: {
                            collapsible: true,
                            collapsed: true,
                            titleCollapse: true,
                            defaultType: 'textfield'
                        },
                        items: [
                            {
                                title: 'Set 1',
                                items: [
                                    {
                                        fieldLabel: 'Test 1',
                                        name: 'test1'
                                    },
                                    {
                                        fieldLabel: 'Test 2',
                                        name: 'test2'
                                    }                            
                                ]
                            },
                            {
                                title: 'Set 2',
                                items: [
                                    {
                                        fieldLabel: 'Test 3',
                                        name: 'test3'
                                    },
                                    {
                                        fieldLabel: 'Test 4',
                                        name: 'test4'
                                    }                            
                                ]
                            }
                            
                        
                        ]                                
                    },
    
    
                    buttons: [{
                        text:'Submit',
                        handler: function(){
                            win.items.items[0].getForm().submit();
                        
                        }
                    },{
                        text: 'Close',
                        handler: function(){
                            win.hide();
                        }
                    }]
                });
            }
            win.show(this);
        });
    });

Thread Participants: 1

Tags for this Thread