OK, I figured it out.  I'll just report back here in case anyone else
stumbles across this.

I added the following line to my MyApp.get.xml file:
   <inherits name="com.my.company.Shared" />

Then I created the file src/com/my/company.Shared.gwt.xml with the
contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.1//
EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.1/distro-
source/core/src/gwt-module.dtd">
<module rename-to='Shared'>
        <source path="model"></source>
</module>

Seems to be working fine.  I have been in the habit of using
BigDecimal to handle money amount so that there is no possibility of
rounding.  I had to change that to float.

This is an interesting slide show from Sun that helped me figure it
out. http://www.javapassion.com/ajax/GWT.pdf

Eric

On Oct 30, 3:43 pm, Eric <edimickeast...@gmail.com> wrote:
> I believe that everything in that package complies with those rules
> (this is a pretty simple app so far).
>
> I am just trying to get past the error:
> Line 18: No source code is available for type
> com.my.company.model.MyClass; did you forget to inherit a required
> module?
>
> I can't find documentation for the *.gwt.xml file anywhere.  I'm
> reading comments in the DTD 
> from:http://google-web-toolkit.googlecode.com/svn/tags/1.7.1/distro-source...
> which are a little helpful but not much.
>
> Eric
>
> On Oct 30, 2:12 pm, Yozons Support on Gmail <yoz...@gmail.com> wrote:
>
>
>
> > This is tricky only in that everything in com.my.company.model (including
> > all params passed in to all methods) is serializable and meets the field
> > restrictions of GWT 
> > (http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication...),
> > and remember to have a no-arg constructor.  The reason is that these objects
> > have to be instantiated as javascript objects on the client side, so it's
> > much more limited.
>
> > What is "upsetting" to me is that while you can mark fields as "transient"
> > so that they are not serialized, it seems you can't do it with methods or
> > constructors, or at least I've not figured out a way yet.
>
> > So, even if you just pass in a non-serializable param to a method that sets
> > your serializable fields normally, it won't work.  This makes it ugly in
> > that generally your server domain objects won't interoperate with GWT
> > objects, and you can't pass your non-serializable server objects to a GWT
> > serializable object's constructor to have it create the javascript object
> > with just those serialized fields.  It will still complain I suppose because
> > that constructor (or creator method if used instead) can't be used in the
> > javascript side.  So if there were a way to mark a method as not
> > serializable for GWT, that would help.
>
> > I'm still checking since that would make my code a bit cleaner if the server
> > domain objects didn't need to know anything about the GWT client objects.
> > That is, I don't mind the client objects knowing how to set themselves from
> > the server domain objects to then pass the data over RPC, as each different
> > client front-end can take care of itself, but it is sad if the server side
> > has to know the various client objects to create them for use by various
> > clients.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to