Results 1 to 2 of 2

Thread: overrriding Ext.ux.LiveSearchGridPanel

  1. #1
    Sencha User
    Join Date
    Nov 2009
    Location
    Aveiro, Portugal
    Posts
    47
    Answers
    3

    Default overrriding Ext.ux.LiveSearchGridPanel

    Hi,

    I'm trying to override Ext.ux.LiveSearchGridPanel using a MVC pattern, using Exts 4.2.1.883 and Cmd v4.0.4.84.

    I've created a new folder app/overrides/ux/.
    I've created a new LiveSearchGridPanel.js under app/overrides/ux/LiveSearchGridPanel.js with:

    Code:
    Ext.define('Ext.overrides.ux.LiveSearchGridPanel',{
        override:'Ext.ux.LiveSearchGridPanel',
        initComponent: function () {
            var me = this;
            me.tbar = ['Procurar', {
                xtype: 'textfield',
                name: 'searchField',
                hideLabel: true,
                width: 200,
                listeners: {
                    change: {
                        fn: me.onTextFieldChange,
                        scope: this,
                        buffer: 100
                    }
                }
            }];
            me.callParent(arguments);
        }
    });
    I also edited sencha.cfg to include:

    Code:
    app.classpath=${app.dir}/app,${app.dir}/app.js,${app.dir}/resources/js,${app.dir}/geoext2-2.0.2/src,${app.dir}/overrides
    app.overrides=${app.dir}/overrides
    In the view where I use LiveSearchGridPanel, I've added:

    Code:
    requires: ['Ext.overrides.ux.LiveSearchGridPanel'],
    The sencha app build runs fine, and adds the following to bootstrap.js:

    Code:
    Ext.Loader.addClassPathMappings({
      "Ext": "ext/src",
      "Ext.overrides": "app/overrides",
     (...)
    });
    In bootstrap.js there is no:

    Code:
    Ext.Loader.loadScript("app/overrides/ux/LiveSearchGridPanel.js");;
    The refresh/build works, but the class Ext.ux.LiveSearchGridPanel is not being overrided in my views.

    What is missing here to make it work?

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Location
    Central Ohio
    Posts
    1,579
    Answers
    165

    Default

    Hi,

    Cmd has an overrides folder in your app root that's created when you generate an application. You should place your overrides there rather than in app/overrides/.

    Hope that helps,
    Tristan

Similar Threads

  1. Ext.ux.LiveSearchGridPanel for architect
    By Mthor in forum Sencha Architect 2.x: Help & Discussions
    Replies: 1
    Last Post: 28 Mar 2013, 8:39 AM
  2. LiveSearchGridPanel.js and IE
    By Moinsen in forum Ext:User Extensions and Plugins
    Replies: 6
    Last Post: 7 May 2012, 1:47 AM
  3. LiveSearchGridPanel.js not loaded?
    By frankpeng in forum Community Discussion
    Replies: 0
    Last Post: 28 Oct 2011, 6:10 AM
  4. Ext.ux.LiveSearchGridPanel translate
    By rpr in forum Ext:User Extensions and Plugins
    Replies: 0
    Last Post: 22 Aug 2011, 3:51 AM

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
  •