Hello, What is the correct way of using EntityProxyId<ProxyType> as a service method parameter?
This question was asked at least once since the release of gwt2.1.1 but was never answered. I tried to use EntityProxyId<DomainTypeProxy> on the client side and DomainType on server side but it wouldn't work. As the app I'm working on is still on 2.1 this was not a pressing issue for me so I put it aside for a while occasionally trying it again on each new gwt release until now. In the mean time I upgraded the app to 2.4 and would like to use EntityProxyId's as method parameter. Luckily this time around there is RF validator thingy so I decided to try once more and just added a client side method to one of my RequestContexts, similar to; abstract Request<List<DocumentProxy>> findDocumentsByProject (EntityProxyId<ProjectProxy> projectId) I did this without defining the server side counterpart, just to see what would RF Validator have to say about it. Validators response was that it can't find service method with signature I kind of expected to see; public static List<Document> findDocumentsByProject (Project projectId) After that, I implemented adequate service method and all was fine until I started the app in dev mode. All I got was deferred binding exception originating from RequestFactoryGenerator. The exception message was "Invalid request parametrisation" and it just flat-out refused EntityProxyId<T> as method parameter. Which is quite contrary to original design goal from 2.1.1 "A service method declared in a RequestContext can take parameters of EntityProxyId type to avoid the need to find() an object just to use it as a method parameter" It seems to me that either I'm "holding it wrong TM" and EntityProxyId's are to be used in a different way as method parameters, although it seems not very likely since RF Validator was ok with it. It's either that or there is something missing from com.google.web.bindery.requestfactory.gwt.rebind.model.RequestFactoryModel, more precisely its validateTransportableType method which throws the exception when it encounters EntityProxyId. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.