Results 1 to 4 of 4

Thread: Multipls feeds in example ' Getting Started with Sencha Touch 2'

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    68
    Answers
    1
    Vote Rating
    0
      0  

    Default Answered: Multipls feeds in example ' Getting Started with Sencha Touch 2'

    HI

    Working through the getting starting example and wanted to know how can I put more than one feed in.
    The example has the SenchaBlog feed in, how would I add another feed to it so both feeds info will show up ?

    Thanks
    Jim

  2. The easiest way would to have a server side script combine. On client you would have to make multiple requests and iterate through them to join into one store.

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    Currently the Blog tab looks like

    Code:
                    {
                        xtype: 'nestedlist',
                        title: 'Blog',
                        iconCls: 'star',
                        cls: 'blog',
                        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'
                                }
                            }
                        },
    
                        detailCard: {
                            xtype: 'panel',
                            scrollable: true,
                            styleHtmlContent: true
                        },
    
                        listeners: {
                            itemtap: function(nestedList, list, index, element, post) {
                                this.getDetailCard().setHtml(post.get('content'));
                            }
                        }
                    },
    So you would have to add another tab and change the tree store to allow to load from another blog.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    68
    Answers
    1
    Vote Rating
    0
      0  

    Default Combine the two feeds?

    Thanks.

    Is their a way to combine the two feeds together ? to show on one list.

  5. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    The easiest way would to have a server side script combine. On client you would have to make multiple requests and iterate through them to join into one store.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •