-
1. Re: Serious: Cannot seem to transport a custom class' object containing an Integer object. Bug or am I doing something else wrong?
jfuerth Jan 24, 2012 12:58 PM (in response to navigateur)Hi again,
The scenario you describe ought to work. It is possible that you have found a bug, but I don't have enough information to draw any conclusions.
Can you post the three classes in question so we can try and diagnose the issue? (Ideally, please chop them down to the smallest amount of code that still makes the problem happen.)
I hope to help you get to the bottom of this issue soon!
Jonathan
-
2. Re: Serious: Cannot seem to transport a custom class' object containing an Integer object. Bug or am I doing something else wrong?
navigateur Jan 26, 2012 7:12 PM (in response to jfuerth)EDIT:
(simplified)
public class Id{
IntegerChain firstInteger = new IntegerChain();
}
public class IntegerChain{
int integer = 123;
IntegerChain next = null;
}
When transporting e.g. a HashMap<Id,String>, Id arrives as:
${$JSON$}$::{"__EncodedType":"my.package.Id","__ObjectID":"123","firstInteger":{"__EncodedType":"my.package.IntegerChain","__ObjectID":"29286527","integer":123,"next":null}}
...if I simply print it directly to the GWT console via GWT.log(). But if I try to call a method on the Id, even "toString()", I get:
java.lang.ClassCastException: java.lang.String cannot be cast to my.package.Id
shown in the browser.
When I transport Id plainly it works fine, and doesn't show that "$($JSON" String when printing it via GWT.log(), it just shows the result of my Id's overridden toString() method.
-
3. Re: Serious: Cannot seem to transport a custom class' object containing an Integer object. Bug or am I doing something else wrong?
navigateur Jan 26, 2012 7:17 PM (in response to jfuerth)Are you able to reproduce the problem with transporting a HashMap<Id, String> using the classes above?
-
4. Re: Serious: Cannot seem to transport a custom class' object containing an Integer object. Bug or am I doing something else wrong?
navigateur Feb 1, 2012 9:47 PM (in response to navigateur)Does nobody get the above error in Errai 1.3.2?
-
5. Re: Serious: Cannot seem to transport a custom class' object containing an Integer object. Bug or am I doing something else wrong?
navigateur Feb 13, 2012 8:35 PM (in response to jfuerth)Is this issue fixed in Errai 2.0?