Hi,

I have been trying to get a local file upload to work in a tab panel.
It works fine in Firefox using a vanilla servlet on the backend, but
in Safari, when I click the button to submit, it freezes every time.

The structure of my page is a little unique, so I will describe it.

I have my entry point class which has a DockPanel as the RootPanel. In
the CENTER of the DockPanel I have my own class called UploadPanel
which extends DockPanel. On there, in the EAST, I have a TabPanel
(with three tabs, the second of which contains my class
UploadFileForm). Also in the UploadPanel I have a button which has my
ClickListener.

The UploadFileForm extends FormPanel and here is the header and
constructor:
public class UploadFileForm extends FormPanel{
        private VerticalPanel mainPanel = new VerticalPanel();;
        private Label fileLabel = new Label("Please choose the location of
the local file you wish to upload.");
        private RadioButtonPanel radioButtonPanel = new RadioButtonPanel();
        private FileUpload uploadField = new FileUpload();
        private MetadataPanel hiddenMetadataPanel;
        private Document document;

        public UploadFileForm(){
                this.setAction(GWT.getModuleBaseURL() + "upload");
                this.setEncoding(FormPanel.ENCODING_MULTIPART);
                this.setMethod(FormPanel.METHOD_POST);

                this.setWidget(mainPanel);
                mainPanel.add(fileLabel);

                uploadField.setName("uploadFormElement");
                mainPanel.add(uploadField);

                mainPanel.add(radioButtonPanel);

                UploadSubmitHandler uploadSubmitHandler = new 
UploadSubmitHandler();
                this.addSubmitHandler(uploadSubmitHandler);

                UploadCompleteHandler uploadCompleteHandler = new
UploadCompleteHandler();
                this.addSubmitCompleteHandler(uploadCompleteHandler);
        }
...
}

onClick in the uploadPanel, I check what Tab is selected, and if its
the one with the UploadFileForm, I do:
        uploadFileForm.submit();

which breaks Safari every time without showing me any information
about exceptions (Safari crashes).

I follow the template here: 
http://www.jroller.com/hasant/entry/fileupload_with_gwt
pretty much exactly except for my unique class structure.

Does anyone have any idea what might be going wrong here?

Thanks so much,
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=.


Reply via email to