Results 1 to 2 of 2

Thread: Sencha Touch UI Search with Solr and MongoDB

  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    158
    Vote Rating
    0
      0  

    Default Sencha Touch UI Search with Solr and MongoDB

    Check out how to extend MongoDB with Solr search and expose it through a Sencha Touch UI.

    http://wp.me/xvmV

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    Nice article!

    Just some feedback that jumps out at me right away. You are really overnesting with this code:

    Code:
    Ext.define('MyApp.view.PetPanel', {
        extend: 'Ext.Panel',
        alias: 'widget.petListPanel',
        config: {
            layout: {
                type: 'fit'
            },
            items: [
                {
                    xtype: 'toolbar',
                    docked: 'top',
                    title: 'Dog Tags'
                },
                {
                    xtype: 'searchfield',
                    docked: 'top',
                    name: 'query',
                    id: 'SearchQuery'
                },
                {
                    xtype: 'list',
                    store: 'PetTracker',
                    id: 'PetList',
                    itemId: 'petList',
                    emptyText: "<div>No Dogs Found</div>",
                    loadingText: "Loading Pets",
                    itemTpl: [
                        '<div>{name} is a {description} and is located at {latitude} (latitude) and {longitude} (longitude)</div>'
                    ]
                }
            ],
            listeners: [
                {
                    fn: 'onPetsListItemTap',
                    event: 'itemtap',
                    delegate: '#PetList'
                },
                {
                    fn: 'onSearch',
                    event: 'change',
                    delegate: '#SearchQuery'
                },
                {
                    fn: 'onReset',
                    event: 'clearicontap',
                    delegate: '#SearchQuery'
                }
            ]
        },
        onPetsListItemTap: function (dataview, index, target, record, e, options) {
            this.fireEvent('petSelectCommand', this, record);
        },
        onSearch: function (dataview, newValue, oldValue, eOpts) {
            this.fireEvent('petSearch', this, newValue, oldValue, eOpts);
        },
        onReset: function() {
            this.fireEvent('reset', this);
        }
    });
    What I mean is the list can have docked items so it doesn't need to be within a panel like that.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

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
  •