Hello, 

I want to run the same method on the client and server side. The reason is 
that the user can call that method when interacting with the UI, but the 
same method can also be called at a later time by a Task on the server 
side. I already wrote the method using the proxy object. I wanted to know 
if there is a way to call the same method on the server side (no proxy) 
without duplicating the code. 

What is the best practice?

Example:

MyObject is a domain object in the server package
MyObjectProxy is the proxy for MyObject

The method that uses the proxies called on the client side.
public static int sum(MyObjectProxy proxy) {
  return proxy.getA() + proxy.getB();
}

I want the same method but for the server side with the following signature:
public static int sum(MyObject domain) {
  return domain.getA() + domain.getB();
}

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/q4mCoAKYy4kJ.
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.

Reply via email to