Empty items
If you don't set any 'items' property, or the 'items' property is empty (set it later), the layout throws an error.
Uncaught TypeError: Cannot read property 'el' of undefined Ext.layout.AccordionLayout.js:313
I checked the code, and the 'items' occured 3 times. I modified the functions in this way:
collapseAll: function() { if (typeof items == 'undefined' || items.length == 0 ) return; //my modification ...... getActiveItem: function() { var me = this; if (typeof me.owner.items == 'undefined' || me.owner.items.length == 0 ) return null; //my modification ...... getExpandHeight: function() { if (typeof items == 'undefined' || items.length == 0 ) return 0; ......
After these modifications, the code seems to work correctly.