Khoa, You can compile multiple modules into a single GWT output. This is in fact preferable since you get many savings w.r.t. script size which affect execution time and download time.
You can have a single module which inherits all the modules you wish to include on your page. You then compile this single module. Fred On Wed, Jul 8, 2009 at 5:56 AM, Khoa Ngo <ngovank...@gmail.com> wrote: > > Hi all, > > I would like to decouple my application into multiple GWT modules. I > use a main module to layout the UI structure: > > <module rename-to='main'> > <inherits name='com.google.gwt.user.User' /> > <entry-point class='com.mycompany.MainWindow' /> > </module> > > The MainWindow contains a MenuBar with a "Home" submenu and the > getMenuBar() method that returns the menubar for child modules to > reuse. > > Then I would like to create 3 child modules for Articles, Products, > Contacts. > > <module rename-to='articles'> > <inherits name="com.google.gwt.user.User" /> > <inherits name="com.mycompany.MainWindow" /> > <entry-point class="com.mycompany.articles.Articles" /> > </module> > > The Articles class will getMenuBar() and add a submenu "Articles" into > it. > > <module rename-to='products'> > <inherits name="com.google.gwt.user.User" /> > <inherits name="com.mycompany.MainWindow" /> > <entry-point class="com.mycompany.products.Products" /> > </module> > > The Products class will getMenuBar() and add a submenu "Product" into > it. > > ... > > The problem is that, I can't group 3 modules above into one > application. If the html page includes 3 generated javascript files, I > get 3 submenu "Home" in the page. Because I have main.js that renders > "Home", and two sub modules articles and products that also renders > "Home" since it inherits from the main. > > If I just include articles.js then "Home" isn't duplicated, but I loss > the products.js. > > Anybody please lets me know if I can design my application following > such way. > > Thanks and Best Regards, > Khoa > > > > -- Fred Sauer f...@allen-sauer.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---