Hi,
My file upload not submitting. Form handler is printing out the debugs
when i click submit, but the server is not registering any activity.
No errors in the log on client or server.
the code:
final FormPanel form = new FormPanel();
form.setAction(GWT.getModuleBaseURL() + "ImageUpload.do");
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);
FileUpload upload = new FileUpload();
upload.setName("uploadFormElement");
panel.add(upload);
panel.add(new Button("Submit it !!!!", new ClickListener() {
public void onClick(Widget sender) {
System.out.println("onClick() called");
form.submit();
}
}));
form.addFormHandler(new FormHandler() {
public void onSubmit(FormSubmitEvent event) {
System.out.println("form handler onSubmit() invoked");
System.out.println("event: " + event);
System.out.println("event.isCanceled: " +
event.isCancelled());
}
public void onSubmitComplete(FormSubmitCompleteEvent event) {
Window.alert(event.getResults());
}
});
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---