Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Answers
    3898
    Vote Rating
    1290
      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 @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.

  4. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    25
    Vote Rating
    0
      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!

Posting Permissions

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