PDA

View Full Version : Form load event?



mikester
27 Nov 2007, 1:43 PM
Is there a way to execute code after a form is loaded?

I created a pop up window that displays XML data...the only problem is I can only display the data by placing a button on the form with a form.load event attached to it.

Is there an easy "onload" event I can get the form to update itself when the window is displayed?

hendricd
27 Nov 2007, 2:36 PM
The Window class has several events to help out there.

Review the API Docs for the 'show' event.


window.on('show', function(win){
Ext.getCmp('xmlForm').load(.......);

});

mikester
28 Nov 2007, 5:26 AM
Thank you! Exactly what I was looking for....

I was trying 'load', 'onload' etc without any luck...

Is there a list of extjs events somewhere? I couldn't find anything in the blogs and forum...

Mike

hendricd
28 Nov 2007, 5:30 AM
Is there a list of extjs events somewhere? I couldn't find anything in the blogs and forum...

Mike

http://extjs.com/deploy/dev/docs/

mikester
28 Nov 2007, 6:32 AM
Could you point to where I can find the event 'show' and all other events I can work with?

-------------V
window.on('show', function(){});

Maybe I'm missing the boat here but when I search the docs I only find links to actual functions/objects/methods like

Ext.Window.Show( [String/Element animateTarget], [Function callback], [Object scope] )

hendricd
28 Nov 2007, 6:38 AM
The detail page for each class shows its public events. Scroll to the bottom of the page to see them all.