I have a TextBox
, and I want to do something with content after box will lose focus.
in older versions of GWT I could use FocusListener
(it has methods onFocus
and onLostFocus
). But t is deprecated and replaced by FocusHandler
.
Is FocusHandler
can handle lost focus event? and how I can distinguish them from onFocus?
As always, the javadoc points to the replacement class(es), in this case BlurHandler
.
In GWT we use BlurHandler
for focus lost, such as below:
textBox.addBlurHandler(new BlurHandler() {
@Override
public void onBlur(BlurEvent event) {
// Your Code
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With