1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    9
    Vote Rating
    0
    dchan is on a distinguished road

      0  

    Default 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,	
      	}
    });

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,337
    Vote Rating
    75
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    You might want to post in the proper place .

    Moving to Sencha Touch help.

  3. #3
    Sencha Premium Member christythomas's Avatar
    Join Date
    Dec 2010
    Location
    Dover, NH
    Posts
    38
    Vote Rating
    1
    christythomas is on a distinguished road

      0  

    Default


    I'm seeing a similar problem. Did you solve this problem? If so, how?

  4. #4
    Sencha User
    Join Date
    Mar 2011
    Posts
    9
    Vote Rating
    0
    dchan is on a distinguished road

      0  

    Default


    Nope. Still no luck. Anybody???

    Thanks, Deborah

  5. #5
    Sencha Premium Member christythomas's Avatar
    Join Date
    Dec 2010
    Location
    Dover, NH
    Posts
    38
    Vote Rating
    1
    christythomas is on a distinguished road

      0  

    Default


    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.

  6. #6
    Sencha User
    Join Date
    Mar 2011
    Posts
    9
    Vote Rating
    0
    dchan is on a distinguished road

      0  

    Default


    Lifesaver! THANK YOU

  7. #7
    Sencha User
    Join Date
    Apr 2011
    Posts
    2
    Vote Rating
    0
    schreyerplace is on a distinguished road

      0  

    Default 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?

  8. #8
    Sencha User
    Join Date
    Apr 2011
    Posts
    2
    Vote Rating
    0
    schreyerplace is on a distinguished road

      0  

    Default


    I forgot to add that setHeight("100%") isn't "fixing" the nested list problem for me.

    Quote Originally Posted by schreyerplace View Post
    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?

  9. #9
    Sencha User
    Join Date
    Feb 2011
    Posts
    2
    Vote Rating
    0
    Geoffrey Freedom is on a distinguished road

      0  

    Default


    Same issue here. Not sure what the problem is.

Similar Threads

  1. [How to ?] Change Content on Orientation Change
    By brush51 in forum Sencha Touch 1.x: Discussion
    Replies: 7
    Last Post: 2 Mar 2012, 8:05 AM
  2. Change Ext.Panel layout on orientation change
    By Plastic in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 30 May 2011, 12:47 AM
  3. orientation change and css
    By wellsbr01 in forum Sencha Touch 1.x: Discussion
    Replies: 11
    Last Post: 17 Dec 2010, 9:58 AM
  4. Replies: 16
    Last Post: 25 May 2010, 7:36 AM

Thread Participants: 4

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar