You found a bug! We've classified it as SDKTOOLS-382 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default Property for change classmapping bootstrap

    Property for change classmapping bootstrap


    Hello.
    In application generated by cmd, the index.html is inside the app folder.

    but in mys projects, the html file must be outide this folder.

    in the generated i must modify the "Ext" path, and the "appname" path.
    in the app.js i must add "appFolder" propertie for all work fine.

    But it's not good solution, and at this time i have not test to compile my project, because i think this configuration must generate errors.

    What is the best way for configure my project correctly for use like this :

    Code:
    WEBSITE_ROOT
    -- index.html
    + application_folder
          + app
               -- app.js
              
          + .sencha
          -- bootstrap.js
          -- build.js
          + ext
    In other hand, i use application with html generated by php ( codeigniter for most projects )

    in a lot of time i must place js applications files in a asset folder ( root/asset/application/app/app.js )

    and the html is on an adress can't be exist on the disk, because it's generated by the url call.

    for theses configuration ( i thinks it's the same reflexion with the frist part of question ) what is the best way ton configure the project .

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    This may be an area where will have a bug but there was an effort to variable-ize this. Try adding this target to your build.xml (not build-impl.xml):

    Code:
        <target name="-before-init">
            <property name="app.page.name" value="index.php"/>
            <property name="app.page.file" location="${app.dir}/../${app.page.name}"/>
        </target>
    The "-before-init" target is intended to be like a "beforeRender" in Ext JS - a spot to do your thing before the build gets going. In this case it is the ideal place to override properties like these. These will be set to default values by the core "-init" target in .sencha/app/build-impl.xml (a good file to read):

    Code:
            <!--
                This property can be modified to change the input and output page file 
                used in the compile command. (eg: index.aspx, index.jsp ... )
            -->
            <property name="app.page.name" value="index.html"/>
            
            <!-- Specify the input page file -->
            <property name="app.page.file" location="${app.dir}/${app.page.name}"/>
    In Ant these property statements only update those properties if you have not already set them.

    Once you've done that, run "sencha app refresh" to update "bootstrap.js" or "sencha app build" to build.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default


    Hello,

    with this configuration the new index.html is used and i can view it in the production build folder.

    but in the bootstrap.js file the paths are write for an index file was in the same folder as app.

    No change in this case.

    Can it's possible to modify other parameters for goods paths in the bootstrap during the developpement ?

    Thanks

  4. #4
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,294
    Vote Rating
    121
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    You are correct - we need to respect these settings in "sencha app refresh". I have opened a ticket for this.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default


    Thank you.

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Posts
    20
    Vote Rating
    2
    mike.arps is on a distinguished road

      0  

    Default


    Here is something to try as a workaround.

    To update the bootstrap try this:
    Code:
    sencha app refresh --base ..
    This will update the base path for the relative-pathing mechanism used when building the classpath mappings.


    To enable a 'sencha app build', you will have to add the following to application_folder/.sencha/app/sencha.cfg:
    Code:
    app.page.name=index.php
    app.page.file=${app.dir}/../${app.page.name}

    Thanks so much!

  7. #7
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    27
    Vote Rating
    1
    pixman is on a distinguished road

      0  

    Default


    if i change the config.cfg file, and add :
    Code:
    app.page.name=index.php app.page.file=${app.dir}/../${app.page.name}
    i have no change, the build work.


    For the bootstrap.js, the new command line :

    Code:
    sencha app refresh --base ..
    Is really great, now, my bootstrap contain, corrects paths !

  8. #8
    Sencha User
    Join Date
    Apr 2013
    Posts
    19
    Vote Rating
    0
    Ant0nin is on a distinguished road

      0  

    Default


    Hello Sencha Touch community,

    I'm a beginner in Sencha Touch and I have a similar issue. I make a mobile user interface for an existant J2EE application. The project is structured as follows :


    Code:
    WEBSITE_ROOT
    -- index.jsp <= include touchApp/index.html
    ++ touchApp 
         ++ app 
         ++ .sencha 
         ++ touch 
         -- bootstrap.js 
         -- bootstrap.json 
         -- app.js  
         -- app.json 
         -- index.html
         -- ...
    Used version : 2.3.1
    Developper mode ON.


    When I try to access to the application from index.jsp, in development.js (line 22), the AJAX request which try to get bootstrap.json failed because the using path is http://localhost:8080/WEBSITE_ROOT/bootstrap.json instead of http://localhost:8080/WEBSITE_ROOT/touchApp/bootstrap.json.

    I have followed the steps described in previous posts but this does not seem to work for me.
    How should I proceed ?

    Thank you in advance.

  9. #9
    Ext JS Premium Member
    Join Date
    Sep 2010
    Posts
    354
    Vote Rating
    5
    stewardsencha is on a distinguished road

      0  

    Default


    I too run from inside a CMS, where I must conform to the given folder structure.

    In the early days (4.0) I wrote a function that determined how many "../" I needed to prepend to the loader path so that my app could be developed in situ.

    Now I think maybe people are talking about using bootstrap instead of the loader path. I have found nothing that will change what gets put into bootstrap (?!)

    This builds the output to where I need to deploy:

    Code:
     build.mydir=../../../../my.site.com/public_html/module/stewnotice/ext build.dir=${workspace.dir}/${build.mydir}/${build.environment}/${app.name}
    And this corrects the css relative path:
    Code:
     sencha app refresh --base ../../../../my.site.com/public_html/module/stewnotice/ext
    That works great for production and testing. But now how do I develop? I am fooling with symlinks trying to shoehorn the workspace/app into my CMS module folder, but any success there breaks the production build css.

  10. #10
    Sencha User
    Join Date
    Apr 2014
    Posts
    1
    Vote Rating
    0
    abhi020585 is on a distinguished road

      0  

    Default bootstrap.json not found (404 Error)

    bootstrap.json not found (404 Error)


    Hi,

    I am new to sencha and i am using sencha cmd4 and senca touch 2.3.1 and tried to create a demo app.
    But on running that app, its shows a error that
    1.2.
    Uncaught SyntaxError: Unexpected token <

    What's wrong i am doing, Please suggest.

    Thanks
    .