View Full Version : Textfield afterrender seems to not fire.

3 May 2010, 11:16 AM

I'm trying to capture the afterrender event so I can do a bit of work and set the value of a label dynamically.

The problem is I never see the after/beforerender events firing.

Ex code:

var hiddenField = new Ext.form.TextField({
id: 'field_' + someParentPanel.id,
name: 'nodeRefUrl',
hidden: 'true',
afterrender: function () {
url: myUrl,
success: function () {
console.info('Success in the afterrender event');
failure: function () {
console.info('Failure in the afterrender event');
Obviously I just want to see something in Firebug showing success / failure of my Ajax call but nothing is even shown.

If I copy paste the afterrender function outside the field definition and let it be executed on its own, I see the messages in console.

Also I've tried with the hidden option set to bother true and false with no difference in output.


4 May 2010, 11:06 AM
You should try this (http://blog.extjs.eu/know-how/which-events-are-fired/). Very useful.

4 May 2010, 11:43 AM
Cool, thank you!