I am trying to read strings off a table in the database and use them as titles in panels inside an accordion panel.
In short the number of panels inside the accordion can change dynamically.
Here is a gist of what i tried – https://gist.github.com/1199695. I get the names from the table with an endpoint in my Ruby class. The returned data contains a string for the client JS function (named addPanel) which is called to add the Panel inside the accordion.
The code executes as i expected but the panels inside the accordion do not show up.
My suspicion is that the rendering is happening before the items get into the accordion.
If i hard code the addition – via class_name.items.add(new Ext.panel.Panel({:title “My panel”}) ) inside the initComponent then i can see the panel titled “My panel” inside the accordion.
Let me know if this is the correct way to approach the problem?
Thanks
Do you need the accordion panes to be Netzke components? If not, then you could try out something like:
Briefly, you just provide your Ext.tab.Panel-based class with the dynamic items configuration (taken from the model).