0

Before explain my problem, I have to say that my GWT version is 2.2.0 and the error only has place when I use Internet Explorer (in this case IE 8).

I have a little GWT project which contains a button that throws the next method:

private void expotarExpediente(VistaExpediente vista) {
    final String templateURL = GWT.getHostPageBaseURL() + "exportar?id="
            + vista.getId();
    Window.open(
            templateURL,
            "Resultado de expotar el expediente: "
                    + vista.getNumeroExpediente(), "");
}

This method creates a template URL to call to a classic HTTPServlet ("exportar") which generates a Zip File to be downloaded by users. The sentence Window.open(...) open a window in the browser that allows download the file.

This works correctly in all browsers except Internet Explorer. The thrown exception is the next:

The thrown exception is the next

10:08:31.208 [ERROR] [sistemadefiniciontramites] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (Error): Argumento no válido. number: -2147024809 description: Argumento no válido. at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Unknown Source)

I can´t find any decent solution searching by google. I would like to know if someone has had this problem or a similar problem before and if he or she could overcome it.

Thanks and excusme for my poor English.

1 Answer 1

1

Internet Explorer does not like spaces in window name when calling window.open(). So your string:

"Resultado de expotar el expediente: " + vista.getNumeroExpediente()

should be without spaces.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much. You were rigth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.