PDA

View Full Version : Adding plugins to Containers



Zavel
7 Mar 2012, 9:00 PM
Hi, I'm attempting to add a PullRefresh plugin to a Container.

Normally, I could specify it like this:

plugins: [...
...passing in the plugins parameter while defining the items. How can i do this within Sencha Designer 2? Do i add a "plugins" parameter, and explicitly set it to the block of JSON defining the plugin? What is the best method?

- Shane

ssamayoa
8 Mar 2012, 6:22 AM
Creating an override over initComponent() so you could change config object before calling overriden method but seems that there is a bug in ExtJS in override mechanism. But if you are using Touch it seems that such bug is fixed in 2 final.

Regards.

UPDATE:
overriding initComponent() works!



Ext.define('AutoGestion.view.override.DatosGenerales', {
requires: 'AutoGestion.view.DatosGenerales'
}, function() {
Ext.override(AutoGestion.view.DatosGenerales, {
initComponent : function() {
alert("initComponent()");
this.title = "Otro";
this.callOverridden(arguments);
}
});
alert("initComponent() overriden...");
});