PDA

View Full Version : GXT drag and drop dont work in IE



BobbyGe
3 Nov 2011, 7:04 AM
I have some troubles whith dnd on IE(7,8,9).
I'm using netbeans and gwt 2.2.0. I create a new project and copy paste the code of BasicDnD (http://www.sencha.com/examples/explorer.html#basicdnd). It works fine on all others browsers except IE. When I open the sencha example BasicDnD (http://www.sencha.com/examples/explorer.html#basicdnd) whith IE it works like a charm.
Thanks in advance

BobbyGe
4 Nov 2011, 6:27 AM
Can anyone help me? :(

Colin Alworth
4 Nov 2011, 10:26 AM
You've got to provide a little more to work from than that: clearly the example you liked to works in IE, and the source there is the actual code used to build that example. Have you changed it at all?

Assuming no, first couple of things to think about: Are you using the same vers of GXT as in the demo (2.2.5)? Are the copied resources all up to date? Did any errors show up when in the browser console (only really applies to IE8, 9, not sure 7 gives useful console messages)? Does it work in either dev mode or in compiled web mode?

BobbyGe
7 Nov 2011, 4:39 AM
Hi Colin, thanks for the reply.
No I don't change the code. Actually I have some other classes that need dnd, so I thought that if the example code works than i have to find the bug i my classes, but when i try to use the example code the problem persists.

The only difference is that i don't use a css file (let me explain I include the gxt-all.css in my project and all the resource folder by I don't have an other css file so this code:

El.fly(parent).addStyleName("dnd-example");
is useless for me).

I use the last version of GXT 2.2.5 and I use the resources folder that i download whith the last version.

In my real project i use the 2.2.3 version and gxt-2.2.3-gwt22.jar and here I can do drag but I can't do drop. In the axample test project where i use the 2.2.5 version (gxt-2.2.5-gwt22.jar) i can't do drag and also drop.

I try to include the gxt-2.2.5-gwt2.jar and for a while the test project works fine but after some changes it come a compile error


GWT Compiling client-side code.
Compiling module org.yournamehere.Main
[ERROR] Errors in 'jar:file:/C:/Users/bobby/Documents/myprojects/java test/WebApplication3/lib/gxt-2.2.5-gwt2.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java'
[ERROR] Internal compiler error
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.isBeanMarker(BeanModelGenerator.java:197)
at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.generate(BeanModelGenerator.java:54)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:662)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
at com.google.gwt.dev.Compiler.run(Compiler.java:215)
at com.google.gwt.dev.Compiler.run(Compiler.java:187)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:166)


[ERROR] Unexpected
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.isBeanMarker(BeanModelGenerator.java:197)
at com.extjs.gxt.ui.rebind.core.BeanModelGenerator.generate(BeanModelGenerator.java:54)
at com.google.gwt.core.ext.GeneratorExtWrapper.generate(GeneratorExtWrapper.java:48)
at com.google.gwt.core.ext.GeneratorExtWrapper.generateIncrementally(GeneratorExtWrapper.java:60)
at com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:662)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:74)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:259)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:248)
at com.google.gwt.dev.DistillerRebindPermutationOracle.getAllPossibleRebindAnswers(DistillerRebindPermutationOracle.java:91)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.doFindAdditionalTypesUsingRebinds(WebModeCompilerFrontEnd.java:106)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.process(AbstractCompiler.java:254)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:175)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.compile(AbstractCompiler.java:288)
at com.google.gwt.dev.jdt.AbstractCompiler$Sandbox$CompilerImpl.access$400(AbstractCompiler.java:145)
at com.google.gwt.dev.jdt.AbstractCompiler.compile(AbstractCompiler.java:632)
at com.google.gwt.dev.jdt.BasicWebModeCompiler.getCompilationUnitDeclarations(BasicWebModeCompiler.java:124)
at com.google.gwt.dev.jdt.WebModeCompilerFrontEnd.getCompilationUnitDeclarations(WebModeCompilerFrontEnd.java:54)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:517)
at com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:35)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:541)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:495)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:407)
at com.google.gwt.dev.Compiler.run(Compiler.java:215)
at com.google.gwt.dev.Compiler.run(Compiler.java:187)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:159)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:166)


I think this because i use the 2.2.0 version of GWT. I don't understend why it works fine for some houres. The compile error should appear immediately.

Colin Alworth
7 Nov 2011, 6:12 AM
The compile error is because in the last year or so GWT has released several jars that break backward compatibility, so we have several jars to fit the right GWT version. You say you are using gxt-2.2.5-gwt2.jar, you should be using gxt-2.2.5-gwt22.jar, as there was such a breaking change in GWT 2.2. This jar is compatible with GWT 2.2.0 to current (2.4.0), and appears to still work with GWT trunk.

As far as I can tell, that css class dnd-example is only there to demonstrate that you can style the elements however you want - the string only appears once in the code, and only once in css:


.x-theme-access .dnd-example { background-color: #232D38;}

Which is just a background color, used only with the Access theme, so it doesn't apply except when that theme is activated. Removing that line will have no effect on the demo if you are using only gxt-all.css.

BobbyGe
7 Nov 2011, 8:56 AM
http://dl.dropbox.com/u/30242607/DnDTetsIE.rar
This is my simple project. Can you take a look and say if I am making something wrong.
I use netbeans 6.9 and tomcat 6.0.26.
I'm in the sh*t with this project.
Thank you

Colin Alworth
7 Nov 2011, 9:07 AM
I'd instead suggest that you make a small project to demonstrate the problem, so that anyone looking at this thread can quickly see what it is you are trying to do. If you would like some direct help with your project, you might be better off looking into getting support.

Your project is apparently quite large (over 50 mb compressed?), and, as I don't run windows, I don't have a rar utility. I can take a quick look if you can upload in a more easily usable format, zip or tarball, but if this is just an html file loading the basic dnd example, why not just upload those files, plus the module file you are using?

BobbyGe
9 Nov 2011, 2:54 AM
I don't think the problem is in the html file or module file, but the composition of the project and libreries so is for that reason that i give you my example projet. The zip file is here (http://dl.dropbox.com/u/30242607/DnDTetsIE.zip).

Otherwise the other files are html (http://dl.dropbox.com/u/30242607/MainEntryPoint.java), module (http://dl.dropbox.com/u/30242607/Main.gwt.xml), mainEntryPoint (http://dl.dropbox.com/u/30242607/MainEntryPoint.java), basicDnDExample (http://dl.dropbox.com/u/30242607/BasicDNDExample.java).

Colin Alworth
9 Nov 2011, 7:58 AM
The html link points to the same as main entry point.

Without even compiling, just running the html files you gave me through a dummy web server, IE8/XP works - I'm concerned you have something else wrong with your setup. I've uploaded these exact files, the ones in your zip, to http://dndtestie.colinalworth.com/, where they will remain running for 24 hours, so you can test on your own.

After compiling on my own, IE8/XP continues to work.

Have you gotten any GWT/GXT app running on your own dev env to work in your local IE versions?

BobbyGe
10 Nov 2011, 3:09 PM
In IE9 doesn't work.
The html (http://dl.dropbox.com/u/30242607/welcomeGWT.html) file link.

Colin Alworth
11 Nov 2011, 5:25 AM
So have we fixed ie7, 8 by hosting on a different server? or are you using a new installation of IE now? Also, are you able to confirm locally that there is no problem with IE7 and 8, or is it just on the demo server?

One reason IE9 may not work is that you are using GWT 2.2, which came out before IE9 was available - the GWT 2.4 is able to detect IE9, so may make code using a new browser, with its own specific quirks, work better. If that is the only problem, try recompiling with GWT 2.4, and test again.