Thursday, August 28, 2014

Use FilterTextBox after a specific time


in my webapp we have a very lagre collection. The user has the ability to filter these collection.

But if you tipe in one letter and start filtering it needs a lot of time. 

So I try to change the valueChangeHandler to only update the value in the box after 2 seconds when typing ended. 

This is my code:

  public void onValueChange( ValueChangeEvent<String> event )
    Timer t = new Timer()
      public void run()
        addChangeHandler( new ChangeHandler()
          public void onChange( ChangeEvent event1 )
   TextBoxPSG.this, getValue() );
        } );
    t.schedule( 15000 );

But this doesn't work -.- 

Any suggestions ? 
Thanks in advance  

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
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment