PDA

View Full Version : Accessing Template Dom elements



mindstuff
5 Jan 2011, 12:13 PM
When in the lifecycle of a panel that has a template assigned available in the life cycle.

so for instance here is my template
"<div id="id1">{whatever}</div>"

I want to add an event on that div in the panel.
Ext.get("id1").on({
tap: function(){ }
});

It seems the only place I can access id1 is in the activate handler and this is a horrible place to add events to dom elements since it only has to be done once.

Any hints.