Thanks Bimbo.

I have tried it with no luck.
I'm working with Chrome.

For testing, I have tried with Firefox and ,well..., submit button is doing
anything.

Maybe is this widget buggy? I'm working, and may work with GWT 2.0.0.




On 7 March 2010 16:51, BimboJones <bimbojone...@gmail.com> wrote:

> Hi,
>
> Have you tried do the add(panel) after you assign the handlers?
>
> On 6 Mar, 19:20, Victor Llorens <victor.llor...@gmail.com> wrote:
> > Hi all,
> >
> > I have a FileUpload and a Button in a GridPanel.
> > Once Button is clicked I submit the form.
> >
> > Analyzing HTTP Traffic, I can see that Post data is void... no file is
> > sent.
> >
> > Does some body know what could be the reason?
> >
> > I attach some info:
> >
> > POST /TFC_Server_unstable/AppReceiver HTTP/1.1
> > Host: localhost:8080
> > Connection: keep-alive
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
> > AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5
> > Referer:
> http://localhost:8080/TFC_Server_unstable/?gwt.codesvr=127.0.0.1:9997
> > Content-Length: 44
> > Cache-Control: max-age=0
> > Origin:http://localhost:8080
> > Content-Type: multipart/form-data; boundary=----
> > WebKitFormBoundary1I85m0l32DvdcUiI
> > Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/
> > plain;q=0.8,image/png,*/*;q=0.5
> > Accept-Encoding: gzip,deflate,sdch
> > Cookie: JSESSIONID=E576D094A24EE9FEF71DA7EF0FDC7801
> > Accept-Language: es-ES,es;q=0.8
> > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
> >
> > ------WebKitFormBoundary1I85m0l32DvdcUiI--
> >
> > Code:
> >
> >         Grid panel = new Grid(5,2);
> >         final FormPanel form = new FormPanel();
> >         form.setWidget(panel);
> >
> >         form.setEncoding(FormPanel.ENCODING_MULTIPART);
> >         form.setMethod(FormPanel.METHOD_POST);
> >         form.setAction("/TFC_Server_unstable/AppReceiver");
> >
> >         // Create a FileUpload widget.
> >         FileUpload fuAppSrcZip = new FileUpload();
> >         fuAppSrcZip.setName("uploadFile");
> >         panel.setWidget(0,1,fuAppSrcZip);
> >
> >         btnPreviousStep = new Button("Previous Step");
> >         btnNextStep     = new Button("Upload and save everything");
> >         btnNextStep.setEnabled(false);
> >         panel.setWidget(1,0,btnPreviousStep);
> >         panel.setWidget(1,1,btnNextStep);
> >
> > add(panel);
> >
> >         // handlers
> >
> >         fuAppSrcZip.addChangeHandler(new ChangeHandler() {
> >
> >             @Override
> >             public void onChange(ChangeEvent event) {
> >                 btnNextStep.setEnabled(true);
> >             }
> >         });
> >
> >         btnNextStep.addClickHandler(new ClickHandler() {
> >
> >             @Override
> >             public void onClick(ClickEvent event) {
> >                 System.out.println(form.getAction());
> >
> >                 form.submit();
> >             }
> >         });
> >         btnPreviousStep.addClickHandler(new ClickHandler() {
> >             @Override
> >             public void onClick(ClickEvent event) {
> >                 controller.previousStep();
> >             }
> >         });
> >
> >         // Add an event handler to the form.
> >         form.addSubmitHandler(new SubmitHandler() {
> >             @Override
> >             public void onSubmit(SubmitEvent event) {
> >                 controller.aplicationSubmitStart();
> >             }
> >         });
> >         form.addSubmitCompleteHandler(new
> > FormPanel.SubmitCompleteHandler() {
> >             @Override
> >             public void onSubmitComplete(SubmitCompleteEvent event) {
> >                 controller.applicationSubmitComplete();
> >             }
> >         });
> >
> > Thnx in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>


-- 
Victor Llorens Vilella

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to