1
votes

Im using the Accordion Layout for Sencha Touch 1.0.1 from Mitchell Simoens git link : https://github.com/mitchellsimoens/Ext.layout.AccordionLayout

I want to put a form panel into one of the accordion items. But although the html in the formPanel shows, when I add items to the panel it goes blank.

Help please!!

My code :

var formp = new Ext.form.FormPanel({
scroll : "vertical",
title : "List Test",
//    scrollable : true,
items : [
    {
        xtype : 'textfield',
        label : 'hello',
        id : 'hello',
        name : 'hello'
    }
  ]
});
 var panel = new Ext.Panel({
        fullscreen : true,
        scroll     : "vertical",
        layout     : {
            type :  "accordion"
        },
                    minHeight : 300,
        items: [
            { xtype : "panel", title : "One Title",   html : "One"   },
            list,
            { xtype : "panel", title : "Three Title", html : "Three" },
            { xtype : "panel", title : "Four Title",  html : "Four"  },
            { xtype : "panel", title : "Five Title",  html : "Five"  },
            { xtype : "panel", title : "Six Title",   html : "Six"   }
        ]
    });
1

1 Answers

0
votes

i have updated this library to fix some problems that i encountered working with this layout, so you can check if this solves your problem

http://pastebin.com/fGRMBMfn

Update:

new Ext.Application({
    launch : function() {
        var panel = new Ext.Panel({
                fullscreen : true,
                scroll     : "vertical",
                layout     : {
                    type :  "accordion"
                },
                minHeight : 300,
                renderTo : Ext.getBody(),
                items: [
                    { xtype : "panel", title : "One Title",   html : "One"   },
                    { xtype : "panel", title : "Three Title", html : "Three" },
                    { xtype : "panel", title : "Four Title",  html : "Four"  },
                    { xtype : "panel", title : "Five Title",  html : "Five"  },
                    { xtype : "panel", title : "Six Title",   html : "Six"   }
                ]
            });
    }
});