Take the 2-minute tour ×

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

share|improve this question

closed as not a real question by casperOne Mar 16 '12 at 22:06


add comment

2 Answers

up vote 1 down vote accepted

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

share|improve this answer
add comment

You can use following

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

share|improve this answer
thanks, but it dont work. Read my comment –  MyTitle Mar 16 '12 at 13:00
add comment
