Re: Trigger button on ENTER inside a TextBox?

2013-03-14 Thread Kody
Thanks Jens. Yes I use uibinder, did not know I can register more than one widget to the same handler method. Will go for this approach. 2013/3/14 K vfdsdfbsdb > sure you must add keyListener for all TextBox . > But if you create one method,it 's smart. > > example for > > private void addListe

Re: Trigger button on ENTER inside a TextBox?

2013-03-13 Thread K vfdsdfbsdb
sure you must add keyListener for all TextBox . But if you create one method,it 's smart. example for private void addListeners(List textboxs ,Listener listener){ for(int i=0;i: > Hi, > > I have a popup with a bunch of TextBox and TextArea fields. Also 3 Buttons > like Save, Cancel, Reset. > For

Re: Trigger button on ENTER inside a TextBox?

2013-03-13 Thread Jens
Do you use UiBinder for the DialogBox content widget? If so you can add more than one widget to @UiHandler: @UiHandler({"box1", "box2", "box3"}) void maybeTriggerSave(KeyUpEvent event) { //check for ENTER and trigger save } Without UiBinder the above is equivalent to: KeyUpHandler maybeTrigge

Trigger button on ENTER inside a TextBox?

2013-03-13 Thread membersound
Hi, I have a popup with a bunch of TextBox and TextArea fields. Also 3 Buttons like Save, Cancel, Reset. For the TextBoxes I would like to trigger the Save action if ENTER is hit while inside a TextBox (not for the TextAreas). Would I have to register a KeyDownHandler for all the TextBoxes (whi