Thank you guys for the tips.
I got it to work!
Thank you very much !

I noticed a VERY STRANGE behaviour.

following your suggestion, I declared:

@ProxyFor(MyPersonEntity, EntityLocator)
PersonProxy

@Service(MyPersonService, MyServiceLocator)
PersonService


I noticed when methods in PersonService are declared "static",
ServiceLocator is "bypassed", and is NEVER used by RequestFactory to
look up "PersonService"
RF directly goes to PersonService.
This was strange, because what is the point of ServiceLocator then, if
it is going to be bypassed ?

to force RF to go through ServiceLocator, you have to remove "static"
from your Service methods.

This is where things get even more STRANGE:

if I do not define a Locator,
I get exceptions complaining PersonRequest did not pass validation.

however if I define a Locator (by extending Locator Interface)
I then have to implement bunch of methods: find/create/getId/
getVersion

I return NULL from all methods, and it still works !

why is that? and why we are forced to define a Locator, if we already
have a Service defined ?
my Locator does nothing !

you can see the code here:
http://paste.pocoo.org/show/308153/


from the debug statements, I see these methods being invoked:
[1022][INFO ][main][EntityLocator:<init>:22] - #####EntityLocator
constructor called ####
[1022][INFO ][main][EntityLocator:getId:45] - ######### get Id
#################
[1023][INFO ][main][EntityLocator:getVersion:57] - ########### get
Version ###############

however, I returned null for all of them,
still the client receives the correct Id/Version as I set in my
PersonService#find method.

could someone from GWT Team please explain.

I am beginning to love the new RequestFactory, Thank You !

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to