Arnab Shaw
Arnab Shaw

Reputation: 539

Call a function after rendering Ext.view.View

How to call a function after rendering Ext.view.View?

Ext.create('Ext.view.View', {
store: Ext.data.StoreManager.lookup('imagesStore'),
tpl: imageTpl,
itemSelector: 'div.thumb-wrap',
emptyText: 'No images available',
renderTo: Ext.getBody()});

Upvotes: 0

Views: 1402

Answers (1)

Telgin
Telgin

Reputation: 1604

You should use the afterrender event like so:

Ext.create('Ext.view.View', {
    store: Ext.data.StoreManager.lookup('imagesStore'),
    tpl: imageTpl,
    itemSelector: 'div.thumb-wrap',
    emptyText: 'No images available',
    renderTo: Ext.getBody(),
    listeners: {
        afterrender: function() {
           // Do something here
        }
    }
});

You can access the documentation for that here

Upvotes: 3

Related Questions