-4

I need to programmatically set text into TextBox and catch event when text was changed. How to accomplish this?

WelcomeTo
  • 19,843
  • 53
  • 170
  • 286

2 Answers2

1

Use setValue("my new value", true);? This will fire an ValueChangeEvent, which you can catch by adding a ValueChangeHandler.

Hilbrand Bouwkamp
  • 13,509
  • 1
  • 45
  • 52
0

You can use following

yourTextBox.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
     public void onValueChange(ValueChangeEvent<String> event) {
    // TODO Auto-generated method stub

     }
});
Rahul Borkar
  • 2,742
  • 3
  • 24
  • 38