1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    stephancelis is on a distinguished road

      0  

    Default Unanswered: List problems

    Unanswered: List problems


    Hi all

    I'm new to Sencha touch, I used to use Jquery mobile but now I want to use sencha touch2. So far I'm loving it!

    Now I'm stuck with something probably basic, showing a list. I was following the getting started video and it showed how to display a list of blogposts.

    First I had something like:

    Code:
    Ext.define('GS.view.Blog', {
    	extend: 'Ext.navigation.View',
    	xtype: 'blog',
    	
    	config: {
    		title: 'Blog',
    		iconCls: 'star',
    		
    		items: {
    			xtype: 'list',
    			itemTpl: '{title}',
    			
    			store: {
    				autoload: true,
    				fields: ['title', 'author', 'content'],
    				proxy: {
    					type: 'jsonp',
    					url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
    					reader: {
                                    type: 'json',
                                    rootProperty: 'responseData.feed.entries'
                                }
    				}
    			}
    		}
    	}
    });
    This was the code from the video and does not show any data. When I changed it to:

    Code:
    Ext.define('GS.view.Blog', {
    	extend: 'Ext.navigation.View',
    	xtype: 'blog',
    	
    	config: {
    		title: 'Blog',
    		iconCls: 'star',
    		
    		items: {
    			xtype: 'nestedlist',
                 title: 'Blog',
                        iconCls: 'star',
                        displayField: 'title',
    			
    			store: {
                            type: 'tree',
    
    
                            fields: [
                                'title', 'link', 'author', 'contentSnippet', 'content',
                                {name: 'leaf', defaultValue: true}
                            ],
    
    
                            root: {
                                leaf: false
                            },
    
    
                            proxy: {
                                type: 'jsonp',
                                url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
                                reader: {
                                    type: 'json',
                                 rootProperty: 'responseData.feed.entries'
                                }
                            }
                        }
    		}
    	}
    });
    But then I get a nestedlist and it shows 2 blue title bars instead of 2. How do I properly use the 'list' instead of 'nestedlist'. Or should I just hide the secondblue bar?
    Attached Images

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Location
    Trabzon
    Posts
    99
    Vote Rating
    0
    harun is on a distinguished road

      0  

    Default


    Hey man, are you sleeping? this is not sencha touch forum. Look at forum title before posting thread. OK?
    Website: harunates.com
    Blog: blog.harunates.com
    Feel free to contact me harun@harunates.com

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    stephancelis is on a distinguished road

      0  

    Default


    Oops sorry didn't notice.

    Thread can be closed/deleted.

    The problem was that I typed autoload instead of autoLoad.

Thread Participants: 1

Tags for this Thread