But what's about this case: This method is from a server-side entity class 
that has to associate it's *user* field with a given user (retrieved by its 
userId).

    public void setUser(final Integer userId) {
        this.user = User.find(userId); // this is what I need to do using 
the "static" way

// below is what I have to do when I'm using SL
//          MainServiceLocator mainServiceLocator = new 
MainServiceLocator();
//          UserDAOService userService = (UserDAOService) 
mainServiceLocator.getInstance(UserDAOService.class);
//          userService.find(User.class, userId)
    }

Ok, the SL could be simpler but the point is: I've to instantiate the SL in 
order to use the find method which could be declared static.

-- 
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/-/g3VZ4gRhMA4J.
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