Hybrid View

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2008
    Posts
    102
    Vote Rating
    1
    scaswell1 is on a distinguished road

      0  

    Default FormPanel spawning new tab in Chrome after submit

    FormPanel spawning new tab in Chrome after submit


    Hi,

    The GXT 3.0.3 FormPanel widget is spawning a new tab/window in Google Chrome v24 after submit completes. How can I get this to stop?

    Thanks!

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This sounds like a bug. Thanks for reporting.

    I will move this thread to the bugs forum for further investigation. We will look into getting this fixed

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2008
    Posts
    102
    Vote Rating
    1
    scaswell1 is on a distinguished road

      0  

    Default


    Thanks, Sven.

    My Google Chrome reports it is running Version 24.0.1312.52 m, for your reference.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    I'm unable to reproduce this using this test case:

    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
    import com.sencha.gxt.widget.core.client.form.FormPanel;
    
    public class Test implements EntryPoint {
    
      public void onModuleLoad() {
        final FormPanel panel = new FormPanel();
        panel.setAction("http://sencha.com");
        panel.setWidget(new TextButton("Submit", new SelectHandler() {
          @Override
          public void onSelect(SelectEvent event) {
            panel.submit();
          }
        }));
        ContentPanel gxtFormPanelWrapper = new ContentPanel();
        gxtFormPanelWrapper.setHeadingText("GXT FormPanel");
        gxtFormPanelWrapper.setWidget(panel);
    
        RootPanel.get().add(gxtFormPanelWrapper);
    
    
        final com.google.gwt.user.client.ui.FormPanel panel2 = new com.google.gwt.user.client.ui.FormPanel();
        panel2.setAction("http://sencha.com");
        panel2.setWidget(new TextButton("Submit", new SelectHandler() {
          @Override
          public void onSelect(SelectEvent event) {
            panel2.submit();
          }
        }));
        ContentPanel gwtFormPanelWrapper = new ContentPanel();
        gwtFormPanelWrapper.setHeadingText("GWT FormPanel");
        gwtFormPanelWrapper.setWidget(panel2);
    
        RootPanel.get().add(gwtFormPanelWrapper);
      }
    }
    I tested both with the GWT FormPanel and the GXT FormPanel, just in case there was some difference. I performed this test using GWT 2.4.0 and GXT 3.0.3, and am running Chrome 24.0.1312.52.

  5. #5
    Sencha Premium Member
    Join Date
    Nov 2008
    Posts
    102
    Vote Rating
    1
    scaswell1 is on a distinguished road

      0  

    Default


    Colin,

    We have upgraded to GXT 2.5.0, which seems to be the only difference between our two cases. And, to clarify, we are using the GXT FormPanel (in case there is indeed any difference between it and the GWT FormPanel.)

    Here's pretty much what our code is doing.
    Code:
        /** File upload form. */
        private FormPanel form = new FormPanel();    form.setMethod(FormPanel.Method.POST);
        form.setEncoding(FormPanel.Encoding.MULTIPART);
        form.setAction(GWT.getHostPageBaseURL() + "datatransfer");
        form.addSubmitHandler(new SubmitHandler() {
    
    
            @Override
            public void onSubmit(SubmitEvent event) {
                // after submit processing
    
                uploader.hide();
            }
        });
    
            // then there's a button they can click which calls form.submit();

  6. #6
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      1  

    Default


    The 'uploader' variable appears to be a Window, or some kind of dialog, or perhaps a progress message?

    Here's a modified example, compiled with GWT 2.5.0 and GXT 3.0.3 that doesn not exhibit the behavior you are describing in Chrome 24 for me. Can you run this simple entrypoint and confirm that the bug is not occurring? Assuming so, can you try to make this more like your use case where the bug *is* happening?

    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
    import com.sencha.gxt.widget.core.client.event.SubmitEvent;
    import com.sencha.gxt.widget.core.client.event.SubmitEvent.SubmitHandler;
    import com.sencha.gxt.widget.core.client.form.FormPanel;
    
    public class Test implements EntryPoint {
    
      public void onModuleLoad() {
        final FormPanel form = new FormPanel();
        form.setMethod(FormPanel.Method.POST);
        form.setEncoding(FormPanel.Encoding.MULTIPART);
        form.setAction(GWT.getHostPageBaseURL() + "datatransfer");
        
        form.addSubmitHandler(new SubmitHandler() {
            @Override
            public void onSubmit(SubmitEvent event) {
                // after submit processing
    
    //            uploader.hide();
            }
        });
    
            // then there's a button they can click which calls form.submit();
        form.setWidget(new TextButton("Submit", new SelectHandler() {
          @Override
          public void onSelect(SelectEvent event) {
            form.submit();
          }
        }));
        ContentPanel gxtFormPanelWrapper = new ContentPanel();
        gxtFormPanelWrapper.setHeadingText("GXT FormPanel");
        gxtFormPanelWrapper.setWidget(form);
    
        RootPanel.get().add(gxtFormPanelWrapper);
      }
    }
    I've also attached a zip containing the compiled files so you can test in your own browser, to ensure there isn't some other difference. I've compiled with <collapse-all-properties /> in my module to keep the compiled size down.
    Attached Files

Thread Participants: 2