I am trying to bind a field of the primitive type "int" to an editor. My editor extends ValueBox<Integer>
, since generics in Java can only use object types.
When I compile my application, I get the following error:
00:00:18,915 [ERROR] Found unexpected type int while evauating path "cadastralDivisionCode" using getter expression ""
Changing the getter and the setter to use an Integer object, does the trick. Is there any way to use a primitive type in the GWT 2.1 editor framework?
You need to wait for 2.1.1 for primitive types. There is an open bug tracking this.
Haven't looked at GWT internals, but most probably it can't be done, because primitive values are not handled by reference and can not be put into Collections.
The only way around is to use equivalent object types, e.g. Integer
for int
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With