PDA

View Full Version : [DUP] Grid view plugin issue



gatherworks
4 Sep 2012, 4:15 AM
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?

aconran
4 Sep 2012, 8:19 AM
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.

gatherworks
4 Sep 2012, 9:50 AM
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):



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!

aconran
4 Sep 2012, 11:33 AM
Looks good. :-0

gatherworks
10 Nov 2012, 12:31 PM
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.

aconran
12 Nov 2012, 12:36 PM
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.

gatherworks
12 Nov 2012, 1:26 PM
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?

aconran
12 Nov 2012, 4:07 PM
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.

gatherworks
12 Nov 2012, 11:07 PM
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!

aconran
13 Nov 2012, 6:16 AM
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.

gatherworks
13 Nov 2012, 6:35 AM
You guys rock!

cswsteve
29 Dec 2012, 10:02 AM
I am also really looking forward to these 2 new Architect features. Is version 2.2 going to be released soon?