How to load different modules in the same project

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

How to load different modules in the same project

Postby terra25 » Sat Mar 03, 2007 2:17 pm

For example:

I want to have an application with two different url.

The first url will be the default and the other will be optional.

It is possible to that with GWT.
terra25
 
Posts: 4
Joined: Mon Jan 29, 2007 5:53 am

Postby Konstantin.Scheglov » Mon Mar 05, 2007 8:26 am

URL in GWT is HTML file that references one or more GWT modules. So, as far as I understand you, you need two HTML files and two GWT modules. In GWT Designer this means that you can just create two GWT modules (it will create HTML file for each).
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Postby terra25 » Mon Mar 05, 2007 5:52 pm

Yes, but when you create a new module you can't do that in the same package, that mean that you have to create other package to hold this module and when you try to deploy the application the compiler make only one module. I tried to create a module by hand and putting in the same directory of the first module created and create it html page and reference the same *.css file without no result.

I have been doing something wrong or in gwt you cannot do that?.

I finally get an idea and tried to create for each page one gwt project, then I compiled the two project wich generate it's respective file, next I put together all these files with some modification and it works.

If I am wrong, do you have any example where I could see this in action.
terra25
 
Posts: 4
Joined: Mon Jan 29, 2007 5:53 am

Postby Konstantin.Scheglov » Tue Mar 06, 2007 3:57 am

I just don't understand exactly what you want, so can not give you good advice.

Yes, GWT Designer requires that each GWT module should be in separate package. However I don't see any problem with this. In any case, GWT compiler can compile only one "root" module, so no matter if two modules are in same folder, in any case they will be compiled separately. If you need some shared public resources, you can create separate (third) GWT module, put resources there and import this new module in gwt.xml files on first two modules.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests