Sasha Brocato
Sasha Brocato

Reputation: 673

What is the difference between "activate" and "show" events on Ext.panel.Panel in Extjs 4?

Various Ext components (like Panel and Container) have the following events documented:

"show" - Fires after the component is shown when calling the show method.

"activate" - Fires after a Component has been visually activated.

What I would like to know is:

Upvotes: 2

Views: 6879

Answers (2)

JonnyRaa
JonnyRaa

Reputation: 8038

If you want something to run after the view is ready use afterrender (or possibly render - they seem to have the same description!). Show only gets fired when something explicitely calls it.

I've not come across activate. Maybe that's like focus? To see where it fits into the chain of events stick in a handler + a break point and see what happens!

Upvotes: 1

Hariharan
Hariharan

Reputation: 3263

Activate : 1. It will be triggered, after the component(DOM) has been loaded with all referece link and shown to the user. 2. Layout lifecycle - basic component creation

Show : 1. It will be triggered, after the component has been shown at the time when we invoke the method "show" of the component. 2. Layout lifecycle - when we call show method of the component.

Thanks.

Upvotes: 0

Related Questions