Results 1 to 3 of 3

Thread: dynamic load class

  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    21

    Default dynamic load class

    Hi,

    When I use the preview mode, the class load dynamically.

    I would like to keep that behaviour, in production mode.


    Why? Because I have a tree menu, and each time I click on the button menu, I would like to load a new page in the container "center" on my page. I don't want to refresh all the pages, how can I do that ?

    Micka,

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    21

    Default

    what about :

    Code:
        var classe = record.get('class');
        if (ChunkCompile.isBuilt) {
            // synchronously load JS
            Ext.Loader.loadScriptFile(
                classe+'.js',
                function() {
                    console.log('SUCCESS');
                },
                function() {
                    console.log('FAIL');
                },
                this,
                true
            );
        }
        var center = Ext.getCmp('center');
        center.removeAll(true);
        center.add({ xtype: classe });

  3. #3
    Sencha User
    Join Date
    May 2010
    Posts
    21

    Default

    well, looks like that it's more complicated from this post :

    https://www.sencha.com/blog/blazingl...-sencha-touch/

    does someone know if extjs 6 make it more easier ? or architect ?

Similar Threads

  1. Load Dynamic Class
    By herme063 in forum Ext JS 6.x Q&A
    Replies: 2
    Last Post: 12 Oct 2016, 12:10 PM
  2. Dynamic Class Load
    By elGringo33 in forum Ext JS 6.x Q&A
    Replies: 7
    Last Post: 22 Dec 2015, 1:59 PM
  3. Dynamic load class
    By cybervirax in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 21 Jan 2011, 12:19 AM
  4. Dynamic Javascript Class Load and Instantiation
    By gcallaghan in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 21 Dec 2010, 11:35 AM
  5. Replies: 15
    Last Post: 1 May 2007, 2:14 AM

Posting Permissions

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