Textfield blur event not triggered when click on button's icon.

I read the GXT forum and just realize that Textfield blur event is not triggered when a button with icon is clicked on the icon. I found a temporary solution to handle this situation. Before submit the data, the textField finishEditing() function must be called.

Here is the code from my project. I'm going to put it in my library after this.


int widgetCount=toolbar.getWidgetCount();
for(int i=0; i < widgetCount;i ++){
  Widget w=toolbar.getWidget(i);
  if(w.getClass().equals(TextField.class)){
    TextField t=(TextField) w;
    t.finishEditing();                       
  }
}

Source : http://www.sencha.com/forum/showthread.php?258421-Field-and-blur-event

0 comments:

 
Copyright © peyotest