Hi All
We have a GUI which consists of some ULCTextFields and an ULCButton. We'd like to have the following functionality: If the enter key is hit, the button must execute an action, based on the values of the text fields.
Well that's the users point of view. Technicaly the text fields are backed by a data bean, each time something changes in a text field, the bean is updated. Once the user hits return, the action of the ok button should take the values of the data bean to execute it's action.
Unfortunately this doesn't work. If we add an action listener to the text field in order to update the data bean, hitting enter updates the data bean, but dos not push the default button anymore (as correcty stated in the docs). We also tried updating the data bean via a focus listener or a registered key stroke, but this doesn't work as well.
In short we need a way to have a action listener on a text field (or other ULCComponents) which does not consume the action event, but leavs it for the panel to execute the action on the default button. It's also very important, that the order doesn't get mixed up, the default button must always be the last action.
The attached snippet trys to make the things more clear. Please note that this is just an example showing our problem. In reality the action of the button has no possibility to access the text fields directly it has nothing else than the data bean.
<<DefaultButtonSnippet.java>>
TIA
Ernst Plüss
Bedag Informatik AG
Abteilung GF GBA
Gutenbergstrasse 1
3012 Bern
Telefon: +41 (0)31 633 21 21 (direkt 633 25 89)
E-Mail: mailto:[EMAIL PROTECTED]
www.bedag.ch
DefaultButtonSnippet.java
Description: DefaultButtonSnippet.java
