PDA

View Full Version : Add handler to a ExtJs button



gregory.cat
29 Mar 2010, 1:33 AM
Hello,

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.

RKoopmans
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 :-).

gregory.cat
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.

Thanks

RKoopmans
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()
});
myWindow.setTitle('Help');
myWindow.show();

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

gregory.cat
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.

RKoopmans
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?