View Full Version : Add handler to a ExtJs button

29 Mar 2010, 1:33 AM

I'm a new user in ExtJs Designer and I'm discovering the software.
I have a question about button in ExtJs Designer, I'm trying to put a button and to add a handler to this button but I don't find where I can do that.
So I would like to know if it's possible to add an handler to a button in ExtJs designer ?

Thank you for your help.

29 Mar 2010, 2:27 AM
Hmm, I've been looking for the same, and couldn't find it either.
I edited the MyViewport.ui.js file. I know you're not supposed to, but to make it work with ASP/AJAX postbacks and make it working with ContentEl's I had to :-).

29 Mar 2010, 3:10 AM
So I have to edit myself the JS file to add the handler to my button ?
I hope there will be an update about handler in the new version.


29 Mar 2010, 3:14 AM
I'm not sure, but i couldn't find it..
for none of the components to be honest..
i just got in the *.ui.js file and added a handler for my button like this:
handler: function() {
var myWindow = new MyWindow({
renderTo: Ext.getBody()

But maybe there is a way! I just don't know :-)

29 Mar 2010, 3:54 AM
Ok I know what you mean.
But I will have a problem when I will open and save my project with ExtJs Designer after editing the *.ui.js file. ExtJs Designer will override the *.ui.js file and delete my handler.

29 Mar 2010, 3:57 AM
Yep, It will. That's why I try to make as little edits as possible.
But i think my design is now complete, so I can work with it now!
Maybe there is something about this topic in the help or Request sections?