Friday, October 24, 2008

keyboard events listener gxt

Keyboard events are handled in a different way in gxt than the traditional keyboardListener events. A new keyNav class has to be created with the component that is being handled. And then the key event that the user needs can be handled. Eg: TextField text = new TextField(); // new text field component new KeyNav(text) //new KeyNav class for text component { @override public void onTab(ComponentEvent ce) /overriding the onTab method { super.onTab(ce); // your code } } I still wonder why gxt doesnot provide more specific listeners like the clickListener or KeyboardListener that handles all the events. They do support all the listeners in a generic way.

No comments: