Reputation: 2299
I am getting empty string as a result of invoiceItem.getDescription()
, but when i use the below code in gwt widget, i am getting
java.lang.IncompatibleClassChangeError:
Found interface com.google.gwt.user.client.Element
, but class was expected
descTextArea.getElement().setAttribute("value", invoiceItem.getDescription());
Any suggestions would be great.
Thanks in advance MSNaidu
Upvotes: 3
Views: 2488
Reputation: 122026
As @ArtemGr said it happens while hotcode replacement(Especially Element is in the code).
Instead of getting element and setting DOM attribute "value"
you can simply do ,
TextArea area = new TextArea();
area.setValue(invoiceItem.getDescription());
Upvotes: 0
Reputation: 12567
Might be this quirk: https://code.google.com/p/google-web-toolkit/issues/detail?id=5252
"... AFAICT, it happened when I was running dev mode and made changes to the code that Eclipse couldn't hotswap into the JVM. Refreshing the app to reload devmode fixed it.
This is annoying, but the JVM is known to not be perfect at hotswap ..."
Upvotes: 8