Re: FormPanel submit() displays popup

2012-08-18 Thread ksurakka
Hello,

I also had same problem, FormPanel opened popup instead 
of calling SubmitCompleteHandler.

To fix this I had to add FormPanel widget into my page.

NOT WORKING pseudo code:

FormPanel formPanel = new FormPanel();

Panel inputPanel = ...some panel...
formPanel.setWidget(inputPanel)

FileUpload fileUpload = ...create and init fileupload...
inputPanel.add(fileUpload);

myPage.add(inputPanel); // added input container panel, WRONG


and WORKING code:

FormPanel formPanel = new FormPanel();

Panel inputPanel = ...some panel...
formPanel.setWidget(inputPanel)

FileUpload fileUpload = ...create and init fileupload...
inputPanel.add(fileUpload);

myPage.add(formPanel); // add form panel instead of input panel CORRECT


Best regards
  Kari S


On Friday, July 24, 2009 9:53:34 PM UTC+3, Scott Selikoff 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 ListenerFormEvent() { 
 public void handleEvent(FormEvent event) { 
 Info.display(Form was 
 submitted,event.getResultHtml()); 
 } 
 }); 

 // Add button for submit 
 form.add(new Button(Submit, new SelectionListenerButtonEvent() 
 { 
 @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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pwrPA-m5CEMJ.
To post to this group, send email to google-web-toolkit@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.



Re: FormPanel submit() displays popup

2009-08-31 Thread mars1412

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 sc...@selikoff.net 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 ListenerFormEvent() {
                 public void handleEvent(FormEvent event) {
                         Info.display(Form was 
 submitted,event.getResultHtml());
                 }
         });

         // Add button for submit
         form.add(new Button(Submit, new SelectionListenerButtonEvent()
 {
                 @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 google-web-toolkit@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
-~--~~~~--~~--~--~---



Re: FormPanel submit() displays popup

2009-08-28 Thread JonJ27

I have also noticed this..

Anybody got any further with it?

I am using this for the logon part of my app... but cant seem to work
out how to chekc that the log on worked.

Any ideas?

Cheers

Jonathan

On Jul 25, 10:39 am, Scott sc...@selikoff.net wrote:
 I noticed this issue only appears in a Google hosted mode web
 browser.  If I deploy the application to an separate Jetty server and
 view it via Firefox, then the application does not load in a popup on
 form submit.

 Does anyone know what fix I need so that submitting a form does not
 spawn a pop-up in Google hosted mode?
--~--~-~--~~~---~--~~
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-toolkit@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
-~--~~~~--~~--~--~---



Re: FormPanel submit() displays popup

2009-08-28 Thread Ian Bambury
The example is not GWT. You might be better off in a group that deals with
whatever it is.
Ian

http://examples.roughian.com


2009/8/28 JonJ27 jon...@gmail.com


 I have also noticed this..

 Anybody got any further with it?

 I am using this for the logon part of my app... but cant seem to work
 out how to chekc that the log on worked.

 Any ideas?

 Cheers

 Jonathan

 On Jul 25, 10:39 am, Scott sc...@selikoff.net wrote:
  I noticed this issue only appears in a Google hosted mode web
  browser.  If I deploy the application to an separate Jetty server and
  view it via Firefox, then the application does not load in a popup on
  form submit.
 
  Does anyone know what fix I need so that submitting a form does not
  spawn a pop-up in Google hosted mode?
 


--~--~-~--~~~---~--~~
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-toolkit@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
-~--~~~~--~~--~--~---



Re: FormPanel submit() displays popup

2009-07-25 Thread Scott

I noticed this issue only appears in a Google hosted mode web
browser.  If I deploy the application to an separate Jetty server and
view it via Firefox, then the application does not load in a popup on
form submit.

Does anyone know what fix I need so that submitting a form does not
spawn a pop-up in Google hosted mode?
--~--~-~--~~~---~--~~
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-Toolkit@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
-~--~~~~--~~--~--~---