This issue duplicates another issue.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default Grid view plugin issue

    Grid view plugin issue


    I created a new property for the gridpanel's view named 'plugins' with this object:
    [{
    pluginId: 'preview',
    ptype: 'preview',
    bodyField: 'text',
    expanded: true
    }]

    Now, when I load the project in the browser, it works as expected. However, inside Artchitect the entire window is blank. When I remove the 'plugins' property, the window shows again.

    How can I use the UX plugins and still use Architect?

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


    For now put it in an as an override.

    We have a larger problem to solve on our team, which is to run and execute all code inside of the Architect canvas (potentially including user submitted content).

    The way it works, anything thats configured through the property grid will render on the canvas, anything that goes through an override will only execute in the actual browser app.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    I have never done the override in Architect. This is what I think the process is:

    I have a window with multiple gridpanels in it. First promote the gridpanel of interest using "Promote to Class". Then override the new gridpanel class with something like this: (instead of overriding the view):

    Code:
    Ext.define('AdminApp.view.override.MyGridPanel86', {
        override: 'AdminApp.view.MyGridPanel86',
    
        viewConfig: {
                itemId: 'view',
                plugins: [{
                    pluginId: 'preview',
                    ptype: 'preview',
                    bodyField: 'text',
                    expanded: true
                }]
            }
    });
    This works for me, but wanted to confirm that it is the most effective way to do it. Also posted it to help others.

    Thanks in advance!

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


    Looks good. :-0
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    Can you please provide me with a status update on when this will be fixed. The override causes compile issue when using the page compile with the new Sencha Cmd 3 toolset.

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


    Running external code inside of our canvas won't be coming until some time next year. Not this coming minor release, but the one afterwards.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    Actually, that is not what I am asking for

    I just need to be able to specify a custom plugin and not get screwed up by Architect. Architect should pretend it is not there. It works at run-time.

    Or is there another way in the constructor to inject the plugin?

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


    The next minor version supports a `createAlias`. Essentially you can put in a placeholder plugin and then change its createAlias to 'preview'.

    So it would work like so:
    - You would either include the preview plugin directly by linking a JS Resource or setting up your Loader properly.
    - You would then add a plugin to your grid.
    - You would then configure its createAlias to 'preview'.

    What do you think of this?

    Alternatively you could also use the coming processConfig feature. You would mark your view as needing additional processing and then you could inject the plugin into your view.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  9. #9
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    Awesome!

    The plugin is already included and completely works when I add add a plugins array to the config. The only issue is that the view within Architect goes blank.

    It sounds like either options will allow me to define something that is "ignored" by Architect (therefor not screw up the view), but at runtime will take the same effect (as what I have today). That is exactly what I need.

    Will this be in the next 2.1 build or do you mean 2.2? Any rough idea on timeframe?

    Thanks!

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


    Quote Originally Posted by gatherworks View Post
    Will this be in the next 2.1 build or do you mean 2.2? Any rough idea on timeframe?
    Both of these features are already implemented in 2.2. We're starting the final sprint to feature complete. Not that far out given we're stable, etc.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 2