Is there any one who can give me a direction on how I can have the common classes truly common (i.e. out of my web project) but still be able to use them on the client side (i.e. have GWT compiler translate them into JS)?
Thanks a lot in advance On Oct 8, 4:21 pm, Ittai <[email protected]> wrote: > I've thought some more about what you said and I'm still not sure of > how this can work: > If I add a "common.jar" to my project then where can I put the > commonData.gwt.xml file? > If I need to create a false "com.company.common" package on my "Web" > project that will only hold my gwt.xml file then that sounds just > wrong. > Otherwise I'm not sure how this can be done as the source packages for > a module can only be its own packages or its sub-packages . > > Ittai > > On Oct 8, 3:02 pm, Ittai <[email protected]> wrote: > > > > > Hi Thomas, > > I'm not sure I understood your answer. > > You're saying put I should put the classes I need in > > "com.company.common.data" (which is in a different project) and then > > add to my build-path of my "Web" project the "common.jar" and then > > where is the dummy gwt.xml supposed to be? I just didn't understand > > what you said about it being in the appropriate package in my "Web" > > project. > > > Thanks for your reply > > > On Oct 8, 2:41 pm, Thomas Broyer <[email protected]> wrote: > > > > On 8 oct, 12:37, Ittai <[email protected]> wrote: > > > > > Hi, > > > > I have a web-app which currently holds this structure: > > > > -Web > > > > --src > > > > ---com.company.web > > > > ----module.gwt.xml > > > > ----otherModule.gwt.xml > > > > ----com.company.web.module > > > > -----com.company.web.module.client > > > > -----com.company.web.module.server > > > > ----com.company.web.otherModule > > > > -----com.company.web.otherModule.client > > > > -----com.company.web.otherModule.server > > > > ----com.company.web.common > > > > -----com.company.web.common.data > > > > and so on. > > > > > I have in my "com.company.web.common.data" package classes which I > > > > mark in my gwt.xml file as a source package because they need to be > > > > used on the client side. So far so good. > > > > However now in order to communicate with a different back-end app of > > > > my company I need to have those classes in a whole different project > > > > under "com.company.common.data" and I'm wondering if that's doable in > > > > GWT? > > > > I want to somehow specify in my gwt.xml file a fully qualified name as > > > > another source package and have GWT compiler do its magic with it. > > > > Let's say that I'll have those classes available as a JAR or as a > > > > dependant project in eclipse to my project. > > > > > The only option I have in mind currently is to have in > > > > "com.company.common" a dummy gwt.xml file and than to have my > > > > module.gwt.xml inherit that dummy gwt.xml. This is ugly as this is not > > > > really a module and the other apps using the common.jar won't really > > > > need this file so I'd rather not go that way. > > > > That's the way to go however; though you don't have to put the gwt.xml > > > within the JAR, you can just have it in the appropriate package in > > > your GWT project only (that's the magic of the Java classpath, it's > > > unrelated to where "on disk" the files live) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
