GWT 2.0 or 2.1? On Jan 5, 2:41 pm, Jim Douglas <[email protected]> wrote: > I'm doing pretty much exactly that with my FileUpload widget, and it > works ok here: > > /* > * User clicked the Chooser OK button. > */ > public void onSubmit(SubmitEvent p_event) > { > if (m_progressUpdateTimer != null) > { > // Upload is already in progress > p_event.cancel(); > return; > } > .... several more validation checks .... > } > > On Jan 5, 12:27 pm, Greg Dougherty <[email protected]> wrote: > > > I have the following code in a GWT 2.1.0 project: > > > public void onSubmit (FormPanel.SubmitEvent event) > > { > > // This event is fired just before the form is submitted. We can > > take > > // this opportunity to perform validation. > > String filename = gDataFileUploader.getFilename (); > > if (filename.length () == 0) > > { > > showAlert ("Need a valid File Name in before we can upload a > > file!"); > > event.cancel (); > > } > > > } > > > Unfortunately, although it is called, the cancel () call doesn't stop > > the submit from happening, and doesn't stop onSubmitComplete from > > being called. Is this a GWT bug or a browser bug? (FireFox 3.6) > > > TIA, > > > Greg
-- 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.
