PDA

View Full Version : [CLOSED] Nested list not showing displayField.



hotdp
17 Feb 2012, 7:36 AM
Hey,
I am using a Navigation View and putting a Nested List inside. When doing so all my items have no text. I am using the test code from.
http://docs.sencha.com/touch/2-0/#!/api/Ext.dataview.NestedList

31833

aconran
17 Feb 2012, 10:53 AM
Could you attach the project so we could take a look?

hotdp
17 Feb 2012, 11:09 AM
Could you attach the project so we could take a look?

Sure, I have just created a test project. Where can I attach/send it?

hotdp
17 Feb 2012, 11:17 AM
Here is the test project. Also the titles are buggy in this combination.

hotdp
20 Feb 2012, 12:32 AM
@aconran

Do you need more information?

If I use a TabPanel the problem is also there. So its not only a Navigation View problem..

aconran
20 Feb 2012, 8:02 AM
Don't think so, thanks for the test case. Its in our todo list to look into this

bharatn
23 Feb 2012, 9:35 AM
Hi,

The project that you attached has no nested list. There is only Navigation View and a child button.
Can you attach the project where you have issue with a Nested List?
Thanks

hotdp
23 Feb 2012, 9:37 AM
Hi,

The project that you attached has no nested list. There is only Navigation View and a child button.
Can you attach the project where you have issue with a Nested List?
Thanks

Hi,
You have to press the button (It says Press!) to see the nested list. It will insert the nested list in the nav:

Ext.define('ListItem', { extend: 'Ext.data.Model',
fields: [{
name: 'text',
type: 'string'
}]
});


var store = Ext.create('Ext.data.TreeStore', {
model: 'ListItem',
defaultRootProperty: 'items',
root: data
});


var nestedList = Ext.create('Ext.NestedList', {
//fullscreen: true,
title: 'Groceries',
displayField: 'text',
store: store
});


me.getMainNav().push(nestedList);

And that code is taken from the docs.

bharatn
24 Feb 2012, 12:47 AM
Try wrapping the Model config with a config wrapper.



Ext.define('ListItem', {
extend: 'Ext.data.Model',
config: {
fields: [{
name: 'text',
type: 'string'
}]
}
});

hotdp
24 Feb 2012, 12:58 AM
Try wrapping the Model config with a config wrapper.



Ext.define('ListItem', {
extend: 'Ext.data.Model',
config: {
fields: [{
name: 'text',
type: 'string'
}]
}
});


Awesome it works! Should you not update the example on http://docs.sencha.com/touch/2-0/#!/api/Ext.dataview.NestedList

bharatn
24 Feb 2012, 1:05 AM
I have created a doc bug - TOUCH-2234.
Thanks for reporting.

ppurohit
22 Mar 2013, 11:49 PM
Hey,

I m using similar example and it is workin fine.. but whenever i provide new url it is only showing Parent data and not the child... i don't know why??

Please Help...