Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9291687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:42:26+00:00 2026-06-18T20:42:26+00:00

I have converted my existing ExtJS 4.1.3 application to use the Sencha CMD recommended

  • 0

I have converted my existing ExtJS 4.1.3 application to use the Sencha CMD recommended structure and tools. I created the structure first, then put my existing app JS files at the place where the single-page JS app should be located.

I currently access the development version of my application at:

{my-server-side-app-url}/sws/dt/index.jsp

where sws is the Sencha workspace and dt is the Sencha single-page app. So far, no problems I believe. Then I run the command:

sencha app build

within my app‘s directory. This completes with several Yui Compressor Warning (Trailing comma is not legal in an ECMA-262 object initializer warnings, but no errors. So I the production index.jsp page (which uses all-classes.js file, which receives the concatenated output of the app build command above) at URL:

{my-server-side-app-url}/sws/build/dt/production/index.jsp

The issue occurs when all-classes.js attempts to load several files which in theory should be included within itself. These include the controllers which are specified in app.js.

Why are these files not being concatenated in all-classes.js? Below is a screenshot of Chrome attempting to load them from all-classes.js, and of course not finding them.

enter image description here

What did I try?
Tried to tweak my app.js to require the controllers via requires; or to make the classes required available via uses as recommended by this question/answer pair, but to no avail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T20:42:27+00:00Added an answer on June 18, 2026 at 8:42 pm

    Try to include all classes you need inside uses or requires section of your app.js.

    Note, that if controller is requiring some views, you may omit that view in require section of app.js, since it will be included anyway when sencha tool will be parsing your controller.

    Try to use full paths when adding files to uses/requires section of app.js. That is, write MyApp.controller.pages.Home or MyApp.store.users.List but now pages.Home or users.List.

    You can use -before-build and -after-build Ant targets to modify your app.js just before sencha tool’s YUI minimizer phase start.
    In my case I ended up with searching for all controllers inside app/controller folder and adding their names to uses section of app.js. For it that was enough, since other needed classes were required from within my controllers.

    In order to be able to find uses section of app.js, I’ve used special comment

    /*ant-generated-content-start*/ /*ant-generated-content-end*/
    

    My app.js

    Ext.application({
        name: 'MyApp',
        appFolder: 'app',
    
        controllers: [
            "main.App"
        ],
    
        uses: [
            /*ant-generated-content-start*/ /*ant-generated-content-end*/
        ],
        autoCreateViewport: true,
    });
    

    My build.xml

    <?xml version="1.0" encoding="utf-8"?>
    <project name="MyApp" default=".help">
        <import file="${basedir}/.sencha/app/build-impl.xml"/>
    
        <target name="-before-build">
    
            <echo message="Collecting all controllers in application class property ... "/>
            <fileset id="app_controllers" dir="${app.dir}/app/controller" casesensitive="yes">
                <include name="**/*.js"/>
            </fileset>
            <pathconvert pathsep="," property="app_controller_names" refid="app_controllers" targetos="unix">
                <chainedmapper>
                    <globmapper from="${app.dir}/app/*" to="${ant.project.name}/*" casesensitive="no" handledirsep="yes"/>
                    <chainedmapper>
                        <regexpmapper from="^(.*)\.js$$" to='"\1"'/>
                        <filtermapper>
                            <replacestring from="/" to="."/>
                            <replacestring from="\" to="."/>
                        </filtermapper>
                    </chainedmapper>
                </chainedmapper>
            </pathconvert>
            <echo message="Collected controllers: ${app_controller_names}"/>
    
            <echo message="Injecting into app.js ..."/>
            <replaceregexp file="${app.dir}/app/app.js"
                           match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
                           replace="/*ant-generated-content-start*/ ${app_controller_names} /*ant-generated-content-end*/"
                           byline="true"
                    />
        </target>
    
        <target name="-after-build">
            <echo message="Reverting to original app.js ..."/>
            <replaceregexp file="${app.dir}/app/app.js"
                           match="/\*ant-generated-content-start\*/(.*)/\*ant-generated-content-end\*/"
                           replace="/*ant-generated-content-start*/ /*ant-generated-content-end*/"
                           byline="true"
                    />
        </target>
    
    </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an existing (old) codeline that we have recently converted from VC6 to
I have converted an Entity framework project to use POCO objects by removing the
I have converted my Datatable to json string use the following method... public string
I have converted this existing C# .NET 2.0 code (which appears to take in
I have converted one of our existing VC++ project from VS 6.0 to VS
I have a fairly intensive application, which I've just converted from a console application
I have created a database and converted the same in edmx/model in one of
I have recently converted my project to use ARC (Automatic Reference Counting). It doesn't
I have been tasked with taking an existing WinForms application and modifying it to
An existing program that is being converted to use Oracle Pro*C is causing problems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.