You could also check out gwt-multipage (http://code.google.com/p/gwt-
multipage/) which basically does this type of switching, but it
generates the switching code for you based on annotated entry points.
You can switch based on a URL pattern (and hopefully soon by a
javascript token variable... and possibly others in the future... see
http://claudiushauptmann.com/a-framework-for-gwt-multipage-applications.html).

This works well for integrating GWT into an existing application where
you want to keep the header/footer/nav/etc. but want to add features
using GWT. However, if you're developing a new application, I would
suggest you also consider displaying all your application views from a
single host page instead and making use of GWT's history support.

-Brian

On Jun 30, 3:08 pm, Chris Boertien <[email protected]> wrote:
> This is just a suggestion off the top of my head and may or may not
> work as i think it will.
>
> To address your case I would setup 1 Module for the entry point and
> use it to choose which of the other Module's to load for the main
> page. I think this should allow you to take the most advantage of code
> splitting so as not to load any of the data for one page when the
> other is chosen.
>
> Something like...
> // PageChooserEntryPoint.onModuleLoad()
>
> if(loadPageOne) {
>   GWT.runAsync(new AsyncCallback() {
>     (new PageOneEntryPoint).onModuleLoad();
>   });} else {
>
>   GWT.runAsync(new AsyncCallback() {
>     (new PageTwoEntryPoint).onModuleLoad();
>   });
>
> }
>
> Im not sure if thats the best way to go about it, but its the first
> thing that came to mind.
>
>
>
> On Wed, Jun 30, 2010 at 7:25 AM, Katharina Probst <[email protected]> wrote:
> > See some documentation here:
> >http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec...
>
> > On Tue, Jun 29, 2010 at 11:59 PM, Michael W <[email protected]> wrote:
>
> >> Yes, you can have more than one module.
> >> If you use Maven, you can view gwt maven plugin for detail.
>
> >> On Jun 25, 5:27 pm, GWT_AL <[email protected]> wrote:
> >> > I need to developer a web application which has more than one main
> >> > page layout.
> >> > I was wondering how to develop more than one main page in a GWT
> >> > application.
> >> > Is it possible to have more than one Module in a GWT app (is that the
> >> > way to achieve this)?
>
> >> --
> >> 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.
>
> > --
> > 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.

-- 
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