-
1. Re: Cannot use generics in Errai RPC
csa Sep 26, 2011 6:23 PM (in response to fvitorc)You're right. Generics are currently not supported in Errai RPC. I have created a feature request for it: https://issues.jboss.org/browse/ERRAI-148
-
2. Re: Cannot use generics in Errai RPC
superfis Oct 12, 2011 4:33 AM (in response to csa)In simple usage it seems to work correctly...
That's my working example:
remote service
...
public List<UserDTOFull> getUsers( ) {
...
}
RPC call
MessageBuilder.createCall( new RemoteCallback<List<UserDTOFull>>( ) {
@Override
public void callback( List<UserDTOFull> response ) {
...
}
}, UsersRPCService.class ).getUsers( );
-
3. Re: Cannot use generics in Errai RPC
csa Oct 12, 2011 2:52 PM (in response to superfis)Yes, this is because the type parameter (UserDTOFull) is a custom type using @ExposeEntity. It wouldn't work for lets say List<Long>. However, we are working on supporting this soon.
-
4. Re: Cannot use generics in Errai RPC
superfis Oct 12, 2011 3:05 PM (in response to csa)Thank you for the explanation.
Do you plan to support Generics in 1.3.0-SNAPSHOT or 2.0-SNAPSHOT?
-
5. Re: Cannot use generics in Errai RPC
fvitorc Oct 12, 2011 9:11 PM (in response to superfis)The reason I started this thread was that I was having problems with generic methods, not generic types:
http://download.oracle.com/javase/tutorial/extra/generics/methods.html
-
6. Re: Cannot use generics in Errai RPC
csa Oct 12, 2011 9:45 PM (in response to fvitorc)You can watch https://issues.jboss.org/browse/ERRAI-148 to track the progress on this. It's scheduled for Errai 2.0.
-