0

I am confused about how to make a multipage app in one GWT project. I have one page with my app and would like to provide an options page.

I don't think you can use 2 onModuleLoads() or something.

So how can you achieve a multipage app in 1 module?

Thanks

james
  • 2,595
  • 9
  • 43
  • 70

1 Answers1

1

Take a look at the MVP architecture - http://code.google.com/webtoolkit/articles/mvp-architecture.html

Even though you don't actually need an MVP paradigm to create a 'Multi-page' gwt application, you will be better off following it in creating your apps.

Basic idea is, you create different view-presenters that will act like different 'pages', and the app controller activates the correct one based on the logic you provide.

EDIT - you can even create multiple html-pages with their own onModuleLoad(), You should prefer that only if - there are logically 2 different applications or you are modifying an existing webpage and cant do without it. I believe you don't have those issues based on your question. Let me know if its otherwise.

Jai
  • 3,549
  • 3
  • 23
  • 31
  • Thanks for the link. No they are not 2 different apps. This might work, gotta take some time to go over it. Basically for this app I have one page that will be the application and and aanother page that will be used for the settings. Is there a simple way to do this without the MVP? – james Jan 14 '12 at 00:47
  • I have found a decent solution. Deck Panel works well. Thanks – james Jan 14 '12 at 01:21
  • Good, but you should look at MVP if you want to make really complicated apps. – Jai Jan 15 '12 at 02:35