Any code that must be shared between the client and the server must have all
classes which it imports available on the client side. In this case, you
cannot actually have a JDO class which imports server-side classes as a
class that will be shared between the client and the server.

What you'll need to do is create a set of DTO objects which are used as a
transport mechanism for the data between the client and the server. These
DTO objects should not have any dependencies on your JDO classes; instead,
your server code should instantiate a new DTO, and populate its fields with
data from the JDO object.

There has been discussion about making JDO classes directly usable by GWT's
RPC mechanism, but a definitive solution does not exist as yet. See the
following thread for more information:

http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/3c768d8d33bfb1dc


http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/3c768d8d33bfb1dc

On Mon, May 4, 2009 at 12:55 PM, Tarelli <[email protected]>wrote:

>
> Hi All,
>
> I am trying to use an external class in my client side interfaces.
> I added the myClass (which is a JDO persisted object) in a shared
> package as the class will be shared between client and server.
> I added in my .gwt.xml file  <source path="shared"/> for the client to
> be able to see the class, which is working.
> The problem though is that myClass uses the
>
> com.google.appengine.api.users.User
>
> class and when I try to compile I get the error
>
> [ERROR] Line 12: The import com.google.appengine cannot be resolved
> [ERROR] Line 33: User cannot be resolved to a type
>
> How can I make the appengine User class visible to the client so that
> I get rid of that error?
> Thanks in advance,
> Matteo
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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