Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    28
    Vote Rating
    0
    michabbb is on a distinguished road

      0  

    Default Howto use Ext.ux.RowExpander ?

    Howto use Ext.ux.RowExpander ?


    any idea ??

    thank you,
    michael

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    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


    Take a look at the FeedViewer example in our examples.
    http://cdn.sencha.io/architect/architect-examples.zip

    It uses the Ext.ux.PreviewPlugin which isn't exactly what you were asking for but should help you along the way.

    Including an external resource, using it, etc
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    28
    Vote Rating
    0
    michabbb is on a distinguished road

      0  

    Default


    thank you, i will try

  4. #4
    Sencha User demon222's Avatar
    Join Date
    Jan 2008
    Location
    Poland, Warsaw
    Posts
    134
    Vote Rating
    4
    demon222 is on a distinguished road

      0  

    Default


    example: overide class:

    PHP Code:

    Ext
    .define('ONLINE.view.override.MGrid', {
        
    requires'ONLINE.view.MGrid'
    }, function() {
        
    Ext.override(ONLINE.view.MGrid, {
                
    plugins: [{
                    
    pluginId'rowexpander',
                    
    ptype'rowexpander',
                    
    rowBodyTpl : [
                        
    '<p><b>Company:</b> {title}</p><br>',
                        
    '<p><b>Summary:</b> {description}</p>'
                    
    ]
                }]
          
        });
    }); 

  5. #5
    Ext JS Premium Member smokeman's Avatar
    Join Date
    Jul 2007
    Posts
    475
    Vote Rating
    2
    smokeman is on a distinguished road

      0  

    Default


    ok, I'm going to need a step by step for this, just saying look at feedviewer isn't the whole picture.

    If I look at feedviewer, I see that you can add a loader config, then looking at the loader I just added to my app, there is the paths config. I can add a path like in feedviewer, 'Ext.ux': 'ux/'
    now, there is also a requires section in the code for the feedviewer application...however if you click on application in the project inspector...in the config, requires is blank(none)
    how did the requires get set to the overrides:
    Code:
     requires: [
            'MyApp.view.override.FeedGrid',
            'MyApp.view.override.FeedPost'
        ],
    I'm guessing that was done in an external editor...?
    and, after saving the project I found these files under app/view/override, I'm guessing I have to manually put them there, and not import as a resource?

    I also see the launch config:
    Code:
    Ext.syncRequire([
    'Ext.ux.PreviewPlugin'
    ]);
    by dropping PreviewPlugin.js in the ux folder, the syncRequire knows to load ux/PreviewPlugin.js?

    looks like the ux is used in one of the override files, I assume by using the requires, it loads them automagically if they are in the folder above?

    just trying to get a handle on how to do all this in extjs4 MVC/architect...

  6. #6
    Ext JS Premium Member smokeman's Avatar
    Join Date
    Jul 2007
    Posts
    475
    Vote Rating
    2
    smokeman is on a distinguished road

      0  

    Default bump

    bump


    was hoping for a sencha response...
    I know adding plugins is coming, but I need to use one now.

  7. #7
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,413
    Vote Rating
    129
    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

      1  

    Default


    Quote Originally Posted by smokeman View Post
    how did the requires get set to the overrides:
    Code:
     requires: [
            'MyApp.view.override.FeedGrid',
            'MyApp.view.override.FeedPost'
        ],
    I'm guessing that was done in an external editor...?
    Incorrect guess, when you create an override inside of architect it will require them (if its different than the default create override).

    Quote Originally Posted by smokeman View Post
    and, after saving the project I found these files under app/view/override, I'm guessing I have to manually put them there, and not import as a resource?
    When you are editing the class click at the top the button that says "Create Override". In general these files are not needed unless you are trying to do something that is beyond the capacities of Architect's WYSIWYG functionality.


    Quote Originally Posted by smokeman View Post
    I also see the launch config:
    Code:
    Ext.syncRequire([
    'Ext.ux.PreviewPlugin'
    ]);
    by dropping PreviewPlugin.js in the ux folder, the syncRequire knows to load ux/PreviewPlugin.js?
    Yup, this is due to the mapping in the loader config.
    Aaron Conran
    @aconran
    Sencha Architect Development Team