-
8 Mar 2011 2:53 PM #1
NestedList not rendering properly, fixes upon orientation change
NestedList not rendering properly, fixes upon orientation change
I've been at this problem for 8 hours and have attempted to scour every possible resource to remedy this.
I have a NestedList that I'm activating and for some reason, the content area (not the toolbar[s]) is not appearing until I change the orientation of my device. Then it loads fine. The odd thing is that this happens in WebKit browsers on both Android and iOS devices, but NOT Chrome or Safari. It's driving me nuts.
I've even tried forcing a doLayout and doComponentLayout at various points (before render, after activate, etc, etc.), but nothing seems to work. Does anyone have any clues?
Here is some potentially relevant snippets:
Code:Ext.regModel('allItems', { fields: [ {name: 'id', type: 'int'}, {name: 'text', type: 'string'}, {name: 'image', type: 'string'}, {name: 'description', type: 'string'} ] }); var optionsStore = new Ext.data.TreeStore({ model: 'allItems', proxy: { url: 'json/?id=1&type=menu', type: 'ajax', reader: { type: 'tree', root: 'items' } } }); Project.views.mainDataList = new Ext.NestedList({ fullscreen: true, toolbar: { ui:'dark', id:'itemToolbar', items: [ {xtype: 'spacer'}, { text: 'Home', align: 'right', handler: function(){ Project.views.mainPanel.setActiveItem(0, {type:Project.defaultAnim, reverse: true}); } } ] }, title: 'Categories', displayField: 'text', emptyText: 'Could not load any items.', store: optionsStore, useTitleAsBackText: false, loadingText: 'Loading...', getDetailCard: function(record, parentRecord) { currentItemRecord = record.attributes.record.get('text'); return new Ext.Panel({ items:[ { xtype: 'container', flex: 4, cls: 'itemPhotoContainer', layout: {type: 'vbox' }, height: Ext.is.Tablet ? 400 : 180, html: '<div class="itemPhoto" style="background-image:url(images/' + record.attributes.record.get('image') + ');"></div>' } ]} ], baseCls: 'homeCanvas', scroll: 'vertical', listeners: { activate: function(){ Project.views.mainDataList.toolbar.setTitle(currentItemRecord); } } }); } }); Project.views.categoriesChooser = new Ext.Panel({ id: 'categoryLister', dockedItems:[{ xtype: 'toolbar', items: Project.objects.bottomToolbarOrder, layout: { pack:'center' }, dock: 'bottom' } ], defaults: { cls: 'card' }, items: Project.views.mainDataList, } });
-
9 Mar 2011 3:59 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,170
- Vote Rating
- 33
You might want to post in the proper place
.
Moving to Sencha Touch help.
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
11 Mar 2011 12:53 PM #3
I'm seeing a similar problem. Did you solve this problem? If so, how?
-
15 Mar 2011 3:14 PM #4
Nope. Still no luck. Anybody???
Thanks, Deborah
-
15 Mar 2011 4:25 PM #5
I have a workaround and that is to setHeight("100%") on the nested list. I do this instead of doComponentLayout as setHeight will call that and ensure the height is not 0 as that is what I was seeing was the cause of the problem.
-
15 Mar 2011 4:29 PM #6
-
4 Apr 2011 4:10 AM #7
Bummer - setHeight("100%") isn't working for me
Bummer - setHeight("100%") isn't working for me
Not only does the nested list not render correctly, return to the parent list causes the list to overlap the docked bottom toolbar.
Rotating the device triggering layout adjustments always fixes everything.
Is there any way to manually fire the orientation change event as a work around?
-
4 Apr 2011 4:13 AM #8
-
26 Apr 2011 10:38 PM #9
Same issue here. Not sure what the problem is.
Similar Threads
-
[How to ?] Change Content on Orientation Change
By brush51 in forum Sencha Touch 1.x: DiscussionReplies: 7Last Post: 2 Mar 2012, 8:05 AM -
Change Ext.Panel layout on orientation change
By Plastic in forum Sencha Touch 1.x: DiscussionReplies: 3Last Post: 30 May 2011, 12:47 AM -
orientation change and css
By wellsbr01 in forum Sencha Touch 1.x: DiscussionReplies: 11Last Post: 17 Dec 2010, 9:58 AM -
[Solved] [1.0.1a / 1.1] DateField change event bugs + proposed fixes
By mystix in forum Ext 1.x: BugsReplies: 16Last Post: 25 May 2010, 7:36 AM


Reply With Quote