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 <[email protected]> > sure you must add keyListener for all TextBox . > But if you create one method,it 's smart. > > example for > > private void addListeners(List<TextBox> textboxs ,Listener listener){ > for(int i=0;i<textboxs.size;i++){ > textboxs.get(i).addKeyListener(listener); > } > } > 2013/03/14 7:02 "membersound" <[email protected]>: > >> 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 (which >> would be lots of boilerplate code)? Or is there anything native in GWT >> catching ENTER key in TextBoxes? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> >> To post to this group, send email to [email protected]. >> Visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Web Toolkit" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/BmA4uaw5HEM/unsubscribe?hl=en > . > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
