Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2012
    Posts
    9
    Vote Rating
    0
    jpwible is on a distinguished road

      0  

    Default 311 isn't deploying the "view" and UI components

    311 isn't deploying the "view" and UI components


    Upgraded to 311, and I'm noticing that when a project is deployed, the "view" level JS files contain what used to be in the UI level code (calling the objects, all properties, tooltips, etc.) and there are no longer any exported "UI" level JS files to handle that stuff.

    Is this intentional? If so, it might create confusion for people who deploy to the same location as an old project and still have their UI files intact.

  2. #2
    Ext JS Premium Member
    Join Date
    Jan 2012
    Posts
    9
    Vote Rating
    0
    jpwible is on a distinguished road

      0  

    Default


    Also, if I make a change in Designer and re-deploy, it won't actually overwrite any of the exported files.

  3. #3
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,305
    Vote Rating
    106
    ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice

      0  

    Default


    Look at this:

    http://www.sencha.com/forum/showthre...l=1#post745334

    ui namespace is no longer used so what you have in such folder is old generated files.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    If you have any more questions about the new code generation pattern, please let us know.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    25
    Vote Rating
    0
    Steve_Terry is on a distinguished road

      0  

    Default


    @aconran

    I have a quick question...

    In my case I had the following in a previous ui file...

    Code:
    Ext.define('testProg.view.ui.testPanel', {
        extend: 'Ext.panel.Panel',
    
        id: 'newPanel',
        title: 'New Panel',
    
        initComponent: function() {
            var me = this;
    
            Ext.applyIf(me, {
                items: [
                    {
                        xtype: 'button',
                        id: 'newButton'
                        ...
                        ...
    The implementation file had the following...

    Code:
    Ext.define('testProg.view.testPanel',
        {
        extend: 'testProg.view.ui.testPanel',
        alias: 'widget.testpanel',
    
        initComponent: function() {
            var me = this;
            me.callParent(arguments);
    
            var newButton = me.down('#newButton');
            newButton.on('click', this.newButtonOnClickMethod, this);
             ...
             ...
    Although with the new change (from dual class to single), it appears the ui file I referenced above (or aka the designer owned file) has not changed much, a few minor changes, "Yes", but very similar.

    The implementation file (or aka the user owned file) however appears to now override the "designer owned file" (as mentioned in the link) although I am having a small issue trying to get the (user owned file) recognized as I am receiving no results when the app launches.

    The (user owned file) contains the following...

    Code:
    Ext.define('testProg.view.override.testPanel', {
        requires: 'testProg.view.testPanel'
    }, function() {
        Ext.override(testProg.view.testPanel, {
    
        //Code I added
        title: 'New testPanel Title',
        initComponent: function()
        {
                var newButton = me.down('#newButton');
                newButton.on('click', this.newButtonOnClickMethod, this);
        }
            
        });
    });
    I guess I'm a bit confused how to now access components at the (designer owned file) since I have been used to the previous method of using 2 classes.

    Is it possibly a small change that I am missing that could correct this issue?

    I have tried the example at the link and that didn't work so it appears that my override files aren't even been accessed at all.

    Thanks in advance!

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    You aren't invoking the standard implementation of initComponent.

    You should do so like:
    Code:
    this.callOverridden(arguments);
    You will want to do this before you try to grab your button as it won't have been created until after your clases initComponent method has been invoked.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    25
    Vote Rating
    0
    Steve_Terry is on a distinguished road

      0  

    Default


    @aconran

    Thanks for the quick response.

    So basically, if I am understanding you correctly, the (user owned file) should be adjusted as such...

    Note: I added spaces and comments for readability!

    Code:
    Ext.define('testProg.view.override.testPanel',
    {   
         //class required for implementing override
         requires: 'testProg.view.testPanel' 
    }, 
    
       function()
       {        
             Ext.override(testProg.view.testPanel,
            {
                    //should work since class was previously created with Ext.define
                    this.callOverridden(arguments);
    
                    //override the view.testPanel's title to be "New testPanel Title"
                    title: 'New testPanel Title',
    
                    //set variable to view.testPanel's newButton
                    var newButton = me.down('#newButton');
    
                    //newButton click event for calling newButtonOnClickMethod
                    newButton.on('click', this.newButtonOnClickMethod, this);
             }); 
        }
    
       //method execution when newButton is clicked on view.testPanel
       newButtonOnClickMethod: function()
       {
              //display alert message of button clicked
              alert('newButton has been clicked!');
    
              //Enable the second new button
              Ext.getCmp('secondNewButton').enable(true);
       }
    
    );
    So not only I am able to access the created components in testPanel but I am also able to create new methods with which to interact with the testPanel components (as shown in newButtonOnClickMethod).

    Hopefully my understanding of what you mentioned is correct!

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    something more like...

    Code:
    Ext.define('testProg.view.override.testPanel', {   
         //class required for implementing override
         requires: 'testProg.view.testPanel' 
    }, function() {        
      Ext.override(testProg.view.testPanel, {
        //override the view.testPanel's title to be "New testPanel Title"
        title: 'New testPanel Title',
    
        initComponent: function() {
          //should work since class was previously created with Ext.define
          this.callOverridden(arguments);
    
          //set variable to view.testPanel's newButton
          var newButton = me.down('#newButton');
    
          //newButton click event for calling newButtonOnClickMethod
          newButton.on('click', this.newButtonOnClickMethod, this);
        },
        //method execution when newButton is clicked on view.testPanel
        newButtonOnClickMethod: function() {
          //display alert message of button clicked
          alert('newButton has been clicked!');
    
          //Enable the second new button
          Ext.getCmp('secondNewButton').enable(true);
       }
      }); 
    });
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    25
    Vote Rating
    0
    Steve_Terry is on a distinguished road

      0  

    Default


    @aconran

    Hmmm I am still not receiving any results or changes from the (user owned file).

    At the very least I would expect the title to be changed which is not.

    If I check the (Net -> JS) tab of Firebug I don't even see the override file being used so my assumption is that the file is not correctly linked with the build and being loaded on app launch.

    When exporting the project from Designer, the directory structure below is created...

    root->app->view->override

    whereas the "view" directory contains the "designer owned file" and the "override" directory contains the "user owned file".

    Previously (I believe in builds <= 298) this was flopped where the directory structure used to be (with dual-classes)...

    root->app->view->ui

    whereas the "view" directory contained the "user owned file" and the "ui" directory contained the "designer owned file".

    Could this be a potential problem?

    When I recheck the API docs, it lists that the override will be included so long as the class it overrides is required and (as far as I know) the examples above include "requires:"

    Any suggestions?

  10. #10
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    It sounds like the file isn't even being loaded...

    If you look at the Application node in the code view is there a requires for it there?
    Aaron Conran
    @aconran
    Sencha Architect Development Team