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 maybeTriggerSaveOnKeyUp = new KeyUpHanlder() { ...... };
box1.addKeyUpHandler(maybeTriggerSaveOnKeyUp);
box2.addKeyUpHandler(...)
....
If you instantiate the TextBoxes yourself you could replace "new TextBox()"
with "createTextBox()" and add the key handler inside that method.
Alternatively you could listen for Key events on your content widget
(addDomHandler()) of your DialogBox and then figure out if the event source
was a TextBox and not a TextArea.
-- J.
--
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.