-1

I have a window I've created using UiBinder. I'm followings Sencha's HelloWorldUiBinder example and have placed a form inside the window. I wanted to know how to reset the form data after the widow has bee closed(hiden)?

lmcadory
  • 2,149
  • 3
  • 14
  • 15

1 Answers1

0

I figured it out. All I did was add all of my fields to a List, then looped through that list in my closeWindow handler. Calling the rest() method. That clears all the data from my fields. I just need to figure out how to get my Radio buttons to select the default options when the window is reopened.

The code looks like this:

@UiHandler("closeButton")
public void onCloseButtonClicked(SelectEvent event){
       for(Field<?> f : fields){
           f.rest();
       }
       window.hide();
}
lmcadory
  • 2,149
  • 3
  • 14
  • 15