1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Vote Rating
    0
    danielleng is on a distinguished road

      0  

    Default Answered: How to import user extensions (e.g. Ext.ux ) into project

    Answered: How to import user extensions (e.g. Ext.ux ) into project


    Hey everyone, I seem to be having a problem importing Ext.ux.grid.FiltersFeature into my project. I have added all the required source code into my project, with the following directory structure in my UX directory:
    Code:
    src - ux - grid - filter - BooleanFilter.js
                                    - DateFilter.js
                                    - ListFilter.js
                                    - NumericFilter.js
                                    - StringFilter.js
                                    - Filter.js
    
                          - menu - ListMenu.js
                                      - RangeMenu.js
    
                         - FiltersFeature.js
    And in app.js i added the following:

    Code:
    Ext.Loader.setConfig({enabled: true});
    Ext.Loader.setPath('Ext.ux', '../ux');
    
    Ext.require([
        ....
        ....
       Ext.ux.grid.FiltersFeature;
    ]);
    I can't get my app to run... however when I change the require to "Ext.ux.grid.*", my app runs properly but am unable to get the filters to show in my grid.
    I've searched the forums but couldn't find the topic that explains the correct way to import user extensions with ExtJS 4.0.7. Hoping someone could enlighten me. Thanks in advance.

  2. You need to have a path setup to resolve Ext.ux to a folder:

    Code:
    Ext.Loader.setConfig({
        enabled : true,
        paths : {
            'Ext.ux' : '/path/to/ux'
        }
    });

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    Answers
    3574
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You need to have a path setup to resolve Ext.ux to a folder:

    Code:
    Ext.Loader.setConfig({
        enabled : true,
        paths : {
            'Ext.ux' : '/path/to/ux'
        }
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

  4. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Vote Rating
    0
    danielleng is on a distinguished road

      0  

    Default


    Thanks a ton. That works perfectly.

    Code:
    Ext.Loader.setConfig({
        enabled : true,
        paths : {
            'Ext.ux' : 'extjs/src/ux'
        }
    });
    I did not specify the path to 'Ext.ux' correctly ... that's why it wasn't working!

Thread Participants: 1