Step 1: Please categorize your java classes as follows:

A. any class that will be compiled to javascript (including any class
that will also be compiled to bytecode for the server)
B. any class that does not belong to A.

Step 2: Decide on a GWT module scope and location:

~/project/gwt/module1

That's the root of your module.  In that folder, place your
Module1.gwt.xml file

Step 3: Create client/ and server/ folders to house java class
categories A and B, respectively:

~/project/gwt/module1/client/
~/project/gwt/module1/server/

Now build out your Java package structures under those, as you wish.
You don't need the <source path=...> in your module file because
client/ is the default.

Some notes on what you've said above:

1. classes destined to webapp/WEB-INF/classes may come partly from
category A, partly from category B.  Make that separation at deploy
time.  You can use java packages below "client" to help separate pure
client classes from shared classes, and write your ant scripts to copy
by package.

2. your "common bean", e.g., needs to be under client/, but can be in
a java package recognized by your build script as needing to get
deployed to the server.

3. your client code "which gonna be translated to javascript" must
also be under client/, but can be (packaged separately so as not to
copy to the server, although it wouldn't do any harm to copy
these .class files as well.

Here's a banal example of what I mean, but you can do better:

~/project/gwt/module1/client/pure - classes needed on client only
~/project/gwt/module1/client/shared - classes needed on both client
and server

4. your module description needs to be at the root of the module
filesystem, as shown above

5. your entry point is just another "client side only" file; see point
3 just above.

That should do it.

Walden


On Oct 25, 4:49 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> hello folks,
>
> i've got following source structure in my project (j2ee):
>
> ~/project/java: //all the common sources which gonna be compiled to ~/
> webapp/WEB-INF/classes
> ~/project/java/c.d.e.UserProfileBean //common bean used to store the
> user profile data
> ~/project/client: //the client code which gonna be translated to
> javascript
> ~/project/client/a.b.c/MyUI.gwt.xml //module description for MyUI
> ~/project/client/a.b.c.client.MyUI //class which implements EntryPoint
>
> now, when running the compiler,I get the message "No source code is
> available for type c.d.e.UserProfileBean; did you forget to inherit a
> required module?" which is referenced by MyUI class.
>
> I've tested any possible combination in the module's source element:
> like <source path="java"/>, but I either get a "non-canonical-path" or
> "relative-"-whatever path which, however does not allow me to compile
> the code until I put everything under the a.b.c.client package....
>
> please, show me the way to get out of this nightmare, thanx!!
--~--~---------~--~----~------------~-------~--~----~
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