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 <[email protected]> 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
>
> On 1 Jun., 11:16, MaveriK <[email protected]> wrote:
>
>
>
> > Hi everyone.
>
> > I'm new in GWT, i've just begun to use GWT a couple of week ago.
> > My goal is to create a web app that shows a login page, and after the
> > log-in shows an interface where the user can interact with the system
>
> > So i was wondering if i need need a multi-page web app, or instead a
> > single-page switching the visibility of widgets on/off.
> > I though the first was the best solution as i don't have lots widgets
> > to manage in one page, but i can't fine a way to make multi-page web
> > app in GWT...
> > I read some posts from GWT discussion but i couldn't find out how to
> > do it.
> > Could someone help me out?
>
> > Tnx in adv

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