Results 1 to 5 of 5

Thread: Extjs 6.5.0 overrides not applying properly

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2013
    Posts
    1

    Default Extjs 6.5.0 overrides not applying properly

    When I try simple override of the title property (or any other), no changes are applied.

    How to reproduce:

    Create simple app with Sencha CMD. Add any override in overrides folder and preview changes on UI.

    c:
    cd C:\
    mkdir TestApp
    cd TestApp
    sencha -sdk "C:\ext-6.5.0" generate workspace "testworkspace"
    cd testworkspace
    sencha -sdk "C:\ext-6.5.0" generate app --classic TestAppA "apps/TestAppA"
    cd apps/TestAppA
    mkdir overrides\view\main
    copy NUL > overrides/view/main/List.js
    notepad overrides/view/main/List.js


    Code:
    Ext.define('TestAppA.overrides.view.main.List',{
        override: 'TestAppA.view.main.List',
        
        title: 'Some other name'
    });

    sencha app watch


    I can see override file in my source on the browser, and if a breakpoint is set to constructor, it will fire but finished class/config has original title and not the overriden one.

    Kind regards,

    Davor

  2. #2
    Sencha User
    Join Date
    Nov 2015
    Location
    Paris
    Posts
    34

    Default

    Seemingly same issue here.

    I have the following override :

    Code:
    Ext.define('Ext.overrides.form.field.ComboBox', {
        override: 'Ext.form.field.ComboBox',
    
    
        getDisplayedValue: function() {
    
    
            console.log("we are in Ext.overrides.form.field.ComboBox getDisplayedValue ");
    
    
            try {
                var rec = this.findRecord(this.valueField, this.getValue(), 0, false, false, true);
                var data = this.getStore().getData();
                console.log("getDisplayedValue() : contenu de store.data :");
                console.log(data);
                if (rec) {
                    return rec.get(this.displayField);
                } else {
                    return "";
                }
            } catch (err) {
                return err;
            }
        },
    
    
        /**
         * Ext.form.field.ComboBox crashes unexpectedly when more than one combo with paging presented on the
         * same physical page in the browser:
         * Ext.ComponentManager.register(): Registering duplicate component id "undefined-paging-toolbar"
         *
         * Solution: just comment nonexistent pickerId when component boundlist creates. Since this pickerId is
         * nowhere used this should be okay and Ext.Component will make sure about unique identifier by itself.
         *
         * Fiddle shows this issue persists in ext-6.0.1.250 but is fixed in ext-6.0.2.437
         *
         * Discussion: https://www.sencha.com/forum/showthread.php?303101
         * Fiddle: https://fiddle.sencha.com/#fiddle/q9p
         */
        createPicker: function() {
            var me = this,
                picker,
                pickerCfg = Ext.apply({
                    xtype: 'boundlist',
                    pickerField: me,
                    selectionModel: me.pickerSelectionModel,
                    floating: true,
                    hidden: true,
                    store: me.getPickerStore(),
                    displayField: me.displayField,
                    preserveScrollOnRefresh: true,
                    pageSize: me.pageSize,
                    tpl: me.tpl
                }, me.listConfig, me.defaultListConfig);
    
    
            picker = me.picker = Ext.widget(pickerCfg);
            if (me.pageSize) {
                picker.pagingToolbar.on('beforechange', me.onPageChange, me);
            }
    
    
            // We limit the height of the picker to fit in the space above
            // or below this field unless the picker has its own ideas about that.
            if (!picker.initialConfig.maxHeight) {
                picker.on({
                    beforeshow: me.onBeforePickerShow,
                    scope: me
                });
            }
            picker.getSelectionModel().on({
                beforeselect: me.onBeforeSelect,
                beforedeselect: me.onBeforeDeselect,
                focuschange: me.onFocusChange,
                scope: me
            });
    
    
            picker.getNavigationModel().navigateOnSpace = false;
    
    
            return picker;
        }
    });
    which works in 6.0.1 but seems to work no more with 6.5.1.16 : no message is displayed in the console.

  3. #3
    Sencha User
    Join Date
    Nov 2015
    Location
    Paris
    Posts
    34

    Default

    Any new on this ?
    Are there other users who experiment the same issue ?

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    India
    Posts
    23

    Default

    I am also facing same issue. I am just simply overriding one of my custom view title, However it is not working. Any one can suggest.

  5. #5

    Default Alternative Solution if your overrides not picked by app.json

    Quote Originally Posted by nitin.loya View Post
    I am also facing same issue. I am just simply overriding one of my custom view title, However it is not working. Any one can suggest.
    [QUOTE] Move your override folder under the app directory and add that to app.json property it should work

    "overrides": [
    "overrides","app/override"
    ]

Similar Threads

  1. Overrides and Resources not properly removed
    By faireu in forum Sencha Architect 3.x: Bugs
    Replies: 2
    Last Post: 26 Nov 2014, 12:34 AM
  2. Replies: 22
    Last Post: 17 Jul 2014, 1:54 PM
  3. Appling my own css file.
    By anasande in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 15 Nov 2010, 12:08 AM
  4. Appling Ext.Resizable to Ext.Panel
    By savsw in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 12 Sep 2010, 8:08 PM

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
  •