I want to upload a file using GWT fileUploader component,
I tried like this,
FileUpload fileUpload = new FileUpload();
filepload.addChangeHandler(new new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
// here i submit the form, and a response is created to client side to display success message.
} });
- OK, so far i can upload a file and, from servlet i can give a success message.
- I handled it with in onSubmitCompleate event of form panel,
- thanks allot.
- let me ask one more thing, is there anyway i can display the file uploaded, before saving it into the database?
- i.e., actually i need to provide a composite component for uploading a file and text area to tell details about the file.
- and when user choose file for uploading, i want give a display of file uploaded(so that he can ensure correct file is uploaded)
- and it will be saved to db when whole form is submitted.