Few days back i was thinking about the same thing(How to do Multipage
it in GWT) and finally i got the solution.
First i would suggest you to stay away from creating mutiple jsp pages
and then embedding one or two widgets in left right etc. I tried that
and it doesn't give the best user experience.
Following thing happens when you mix jsp and GWT
1) First server request to retrieve jsp/HTML page
2) Then it start downloading all the HTML content like images and
scripts,some time GWT scripts are quite big if you use some other
framework like gwtext etc)
3) Once everything is loaded browser fire default javascript
function(onModule from your GWT class).
4) Atleast one more call to server again to retrive data from server
to show it in GWT.(if you want to show some data)
Now user go to different page and the four steps will repeat(ofcourse
script cache can be used but still)
So for above reasons i would not mix JSPs with GWT. Either just JSP or
just GWT.
Now before thinking about multipage, you need to think why u want
multipage. If its a website then you might need a multipage design but
if its a application like any desktop application then i would
recommend not to think about multipage view.
For desktop Application like, you can create one mainPanel(basically
just a verticalPanel or anything like that), and add it your HTML
using RootPanel.get().add();
And then whenever user choose something always do this (use mainPanel
and not RootPanel.get().add())
Say u want to show Login
mainPanel.clear();
mainPanel.add(new LoginPanel());
Say u want to show Screen1Panel
mainPanel.clear();
mainPanel.add(new Screen1Panel());
etc etc
But say now u decided to go with multipage then you can implement it
using History.More details you can find on this thread. Basically you
will need to learn bit more about history and it will give your
website a very good and fast user experience.
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/80c27e2d7d06d972
Thanks,
Ravi.
On Jun 3, 10:53 am, Stefan Bachert <
stefanbach...@yahoo.de> wrote:
> Hi,
>
> GWT-application are in general single page applications (like any Ajax-
> application).
> When you for some reason need more the one browser window, you should
> communicate via the server.
> However, this should not be a topic for a starter.
>
> Stefan Bacherthttp://
gwtworld.de