Editor and primitive types
I have a simple class that contains an integer:
class Whatever{
int theInteger;
public int getTheInteger(){
return theInteger;
}
public void setTheInteger(int i){
theInteger = i;
}
// getters, setters, etc.
}
so I created an Editor like so:
public class WhateverEditor extends Composite implements Editor<Whatever> {
@UiField
IntegerBox theInteger;
// other fields
interface Binder extends UiBinder<Widget, WhateverEditor> {
}
public WhateverEditor() {
Binder binder = GWT.create(Binder.class);
initWidget(binder.createAndBindUi(this));
}
}
This will not compile with an error that says:
Found unexpected type long while evauating path "theInteger" using getter expression ""
Unable to create Editor model due to previous errors
If I replace the type of theInteger from int to Integer in the Whatever class then it compiles fine. But I want to have int as theInteger type.
There should be a simple solution but i could not find it. Any help is much appreciated.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home