hmm.. * not sure, if that's your problem, but I think the hosted-mode browser will warn you, if you try to access URLs on different sites so it might help, if you build an absolute URL for the forms action (use com.google.gwt.core.client.GWT.getModuleBaseURL())
* you should use formPanel.addFormHandler() On Jul 24, 8:53 pm, Scott <[email protected]> wrote: > While trying to create a FormPanel that uploads a file, my application > launches a pop-up window on FormPanel.submit(). Furthermore, the > listener designed to retrieve the results from the submit never gets > fired. I'm using the latest GWT 1.7. Below is a simplified example > that reproduces the issue: > > public void onModuleLoad() { > // Setup form > final FormPanel form = new FormPanel(); > form.setEncoding(FormPanel.Encoding.MULTIPART); > form.setMethod(FormPanel.Method.POST); > form.setAction("uploadServlet"); > > // Add submit response handler: Never gets called! > form.addListener(Events.Submit, new Listener<FormEvent>() { > public void handleEvent(FormEvent event) { > Info.display("Form was > submitted",event.getResultHtml()); > } > }); > > // Add button for submit > form.add(new Button("Submit", new SelectionListener<ButtonEvent>() > { > @Override > public void componentSelected(ButtonEvent ce) { > form.submit(); > } > })); > > RootPanel.get().add(form); > > } > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
