Hi Isaac...

I should make this even clearer.  My bean-like classes are scattered
throughout my codebase, and not concentrated in one place.  They many
are JAXB beans and import javax.xml classes, which appears to break
compilation in GWT.  I'll check into that here, perhaps others have
tried this.

Basically, I'm trying - as others have tried - to avoiding having to
do a lot of work merely to use classes that are simple beans, though
they may use certain unsupported packages (like the JAXB packages) and
annotations, etc.

It's *looking* like I may have to create a common interface, and
create my own beans and use BeanUtils to copy them on the server side,
unfortunately.

- Tim

On Apr 8, 5:34 am, Isaac Truett <itru...@gmail.com> wrote:
> Tim,
>
> "Making a module" means creating one XML file.
>
> src/com/mycompany/Domain.gwt.xml:
>
> <module>
>     <source path="domain" />
> </module>
>
> ... and done. Inherit that in your GWT app and, assuming that
> everything in com.mycompany.domain is GWT-compatible, you're set.
>
> - Isaac
>
> On Wed, Apr 8, 2009 at 1:49 AM, TimOnGmail <timbes...@gmail.com> wrote:
>
> > Yes, just for testing purposes, before I actually need to compile
> > everything into JavaScript.
> > Both hierarchies are part of the same project, by the way, and I have
> > already added the non-module
> > hierarchies (both source and compiled) to the class path of the launch
> > configuration for the module.
> > But when I launch it I get lots of these kinds of things:
>
> > [ERROR] Line 16: No source code is available for type
> > com.on24.loadtest.management.AgentEntry; did you forget to inherit a
> > required module?
>
> > - Tim
>
> > On Apr 7, 10:15 pm, Vitali Lovich <vlov...@gmail.com> wrote:
> >> If you're just trying to launch hosted mode, adding the other project onto
> >> the build-path should be sufficient.  Have you actually tried this & it
> >> didn't work?  You might also want to add the other project as being a
> >> dependancy of the GWT project (not necessary for it to work, but just nicer
> >> from a behaviour of Eclipse perspective).
>
> >> However, I've never heard of anyone actually compiling the Java into
> >> javascript from eclipse - it's certainly possible, but it's not what the
> >> default launch config does.
>
> >> On Wed, Apr 8, 2009 at 1:04 AM, TimOnGmail <timbes...@gmail.com> wrote:
>
> >> > Hi Vitali...
>
> >> > Well, I wasn't thinking of how to compile everything together in an
> >> > Ant script.
>
> >> > Rather, I was thinking of using the launch config that's created when
> >> > you follow the "how to create a module" instructions, and use it to
> >> > launch the test, without doing any special build processing.  You
> >> > know, follow "how to" for Eclipse instructions, but rearrange the
> >> > locations of things or just modifying the single module I'm writing,
> >> > so that it drags in the other classes from the Eclipse src/ and bin/
> >> > folders.
>
> >> > Are you talking about creating a custom builder for the project?  I
> >> > already depend upon the default builder for my project.
>
> >> > - Tim
>
> >> > On Apr 7, 9:29 pm, Vitali Lovich <vlov...@gmail.com> wrote:
> >> > > For development, yes.  Simply add the other project as a dependancy.
>
> >> > > However, you can try fooling around with the classpath you provide the
> >> > > compiler - maybe that will work.
>
> >> > > <java failonerror="true" fork="true"
> >> > > classname="com.google.gwt.dev.Compiler">
> >> > >   <classpath>
> >> > >     <pathelement location="path to my beans"/>
> >> > >     <pathelement location="src"/>
> >> > >   </classpath>
> >> > >   <arg value="com.foo.bar.MyModule"/>
> >> > > </java>
>
> >> > > If it doesn't, you could always just maintain an ant task that takes
> >> > those
> >> > > beans & packages them into a module.  No it's not ideal because of the
> >> > > multiple locations you have to keep track of dependancies, but it 
> >> > > should
> >> > > work.
>
> >> > > On Tue, Apr 7, 2009 at 9:51 PM, TimOnGmail <timbes...@gmail.com> wrote:
>
> >> > > > I found some discussions of this here, but the answer always seems to
> >> > > > be "you can't" (unless you make them part of a module, with a common
> >> > > > parent, etc. etc., which I do not want to do).
>
> >> > > > Basically, I have this Eclipse project structure:
>
> >> > > > 1. src/com/mycompany/domain/... (serializable domain objects)
>
> >> > > > 2. gwt/[recommended structure]
>
> >> > > > I want the serializable domain objects in #1 available to the module
> >> > > > in #2, WITHOUT HAVING TO MAKE #1 A MODULE.
> >> > > > Seems like it should be doable, doesn't it?  But from what I've read
> >> > > > here, it can't be done.
>
> >> > > > I also tried putting everything in #2 into the top level src/
> >> > > > hierarchy, and put all the module support files in the top level of
> >> > > > the project, but I couldn't get it work that way, either.
>
> >> > > > So... as of today, is it at all possible to have 2 separate source
> >> > > > hierarchies, 1 of which contains a GWT module, the other of which
> >> > > > contains simple serializable beans, and have the module be aware of
> >> > > > the other classes?  I mean, they are there, they are serializable, 
> >> > > > the
> >> > > > source is available - why wouldn't it be possible to point the GWT
> >> > > > module to any arbitrary place where there are classes that can be
> >> > > > used?  Seems weird.
>
> >> > > > Failing that, is it possible to have a standard Eclipse project
> >> > > > format, like the above, with the GWT module classes embedded in the
> >> > > > src/ hierarchy?  If so, how would you set up the module file, etc.?
>
> >> > > > - Tim
>
> >> > > > On Apr 7, 5:25 pm, TimOnGmail <timbes...@gmail.com> wrote:
> >> > > > > Hi all...
>
> >> > > > > I've looked around here, and didn't find this specific question 
> >> > > > > asked
> >> > > > > (although I'm sure it has been).
>
> >> > > > > I have created a module, and have a bunch of bean classes residing
> >> > > > > elsewhere.  These bean classes are all Serializable (since I 
> >> > > > > transfer
> >> > > > > them between several servers already), and I want to use them in my
> >> > > > > module.  However, I don't want to have to turn these other 
> >> > > > > libraries
> >> > > > > INTO modules just to use these bean classes.
>
> >> > > > > Is this even possible in GWT?
>
> >> > > > > - Tim
--~--~---------~--~----~------------~-------~--~----~
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