View Full Version : NestedList displayed without list items until rotation

27 Jul 2011, 6:36 AM
Hey everyone,

I am very new to sencha touch and I have encountered a problem.

I have an application with 5 tabs, each of them defined by an xtype pulled from an external js file.

The xtype 'pastcard' is defined by the following code and contains a NestedList.

var data = {
text: 'MyList',
items: [{
text: 'Item A',
items: [{
text: 'Example 1',
text: 'Item B',
items: [{
text: 'Example 2'
Ext.regModel('ListItem', {
fields: [{name: 'text', type: 'string'}]
var store = new Ext.data.TreeStore({
model: 'ListItem',
root: data,
proxy: {
type: 'ajax',
reader: {
type: 'tree',
root: 'items'
var nestedList = new Ext.NestedList({
fullscreen: true,
title: 'MyList',
displayField: 'text',
dock: 'top',
store: store
metanamorph.views.Pastcard = Ext.extend(Ext.Panel, {
title: "past",
iconCls: "add",
dockedItems: nestedList

Ext.reg('pastcard', metanamorph.views.Pastcard);

The problem is that this NestedList does not contain the list items Item A and Item B so the past tab show MyList at the topbar but nothing else.
However from the moment I have rotated the Device, the list is being displayed. I'm guessing it's because there is some sort of refresh going on.

Can anyone help me?

Thank you in advance