1. When the user presses "Enter" in a TextField, I want it to call a method in my controller. What event should I use? Please provide a code sample...
2. Once in my controller code, what's the proper way to get the contents of the TextField?
3. Where can I find documentation on which events do what for each widget? I'm using getRawValue() but I'm not sure if that is correct. I want all the text not just what is selected...
btw - I did try listening for key press and it worked EXCEPT that I could not display a Dialog box if the field didn't validate. I suspect this has something to do with the fact that the key press was early in the event cycle (before the key up.)
1. When the user presses "Enter" in a TextField, I want it to call a method in my controller. What event should I use? Please provide a code sample...
2. Once in my controller code, what's the proper way to get the contents of the TextField?
3. Where can I find documentation on which events do what for each widget? I'm using getRawValue() but I'm not sure if that is correct. I want all the text not just what is selected...
btw - I did try listening for key press and it worked EXCEPT that I could not display a Dialog box if the field didn't validate. I suspect this has something to do with the fact that the key press was early in the event cycle (before the key up.)
uhm, can't you use the search funct. of the forum?? or just open your eyes?? there is a post already and it is even active and quite new. there are a lot code examples
....
you can actually use the KeyNav class or the keyboardListener class to work on the listening keyboard events. You can have a look at what EagleEye was talking about.. http://www.extjs.com/forum/showthread.php?t=50428
You will have to set the enableKeyEvents config option to true as mentioned there. That will be visible in the next release of the docs.
Don't take EagleEye's comments to heart. These questions get asked time after time after time, and it sometimes feels as if nobody listens or is willing to read docs and just hack.. The docs now contain 99% of the information you need to get a standard Ext app running.
You will have to set the enableKeyEvents config option to true as mentioned there. That will be visible in the next release of the docs.
Don't take EagleEye's comments to heart. These questions get asked time after time after time, and it sometimes feels as if nobody listens or is willing to read docs and just hack.. The docs now contain 99% of the information you need to get a standard Ext app running.
hej dont be to nice
I'm not long here, even though i try to help. Sometimes it is just annoying
I have rechecked the GXT API. There we just have a enableEvents(boolean true) method, which is inherited from class com.extjs.gxt.ui.client.widget.Component. But it is really necessary to turn that on? Isn't default true?
There we just have a enableEvents(boolean true) method, which is inherited from class com.extjs.gxt.ui.client.widget.Component. But it is really necessary to turn that on? Isn't default true?