I am trying to provide capability to upload file in my vaadin application

`protected Upload questionImageUpload = new Upload("Upload question", questionReceiver);`

```
    questionImageUpload.addFinishedListener(new Upload.FinishedListener() {
        @Override
        public void uploadFinished(Upload.FinishedEvent event) {
            boolean hasLock = VaadinSession.getCurrent().hasLock();
            button.setEnabled(false);
        }
    });

```

But, in my `FinishListener.uploadFinished()`, if I modify some UI element (in above, I disable a button), the modification does not get applied.

I assumed that this method may be invoked in a non UI thread so I checked whether `VaadinSession` is available by putting a breakpoint in `uploadFinished` above. But, `VaadinSession.getCurrent()` didn't return null. Also `hasLock` is also true.

What could be the reason?

I am running this vaadin application on Google App Engine (still running locally inside IntelliJ IDEA). Could that be the reason behind this?