Ext GWT Premium Member
Getting input from a TextField
I have some basic questions about TextField:
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
Originally Posted by rlaferla
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..
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.
Sencha Premium Member