开发者

Google web toolkits - multiple pages

开发者 https://www.devze.com 2023-03-08 04:50 出处:网络
On the google website there an example of a simple GWT appliatoin, following is a link: http://code.google.com/webtoolkit/doc/1.6/tutorial/create.html

On the google website there an example of a simple GWT appliatoin, following is a link:

http://code.google.com/webtoolkit/doc/1.6/tutorial/create.html

The above application has a host page:StockWatcher.html and StockWatcher.java is the entry point.

If I wanted to add more html pages to this application, we keep one single host page and the entry point will add different panels depending on which link the user clicked on? In this case, how to know which link the user clicked on? If I create a navigation panel and each link has a request parameter, then after the user clicks on the link, How to get the request parameter?

Are 开发者_Python百科there any tutorials available online on how to create a fully functional application? The one example google provides is too simple. Thanks so much in advance


You have two options to have multiple page web application using gwt.

1) Use gwt history feature and listen for the history change. In this approach at the initial page load itself browser downloads all the javascripts(Including the widgets which are not useful in current link). Still this can be avoided by using gwt code splitting.

2) Create multiple modules. In this case you have to create multiple html pages and GWT entry points. For each major functionality create a gwt module and link that with [modulename].html file. In this approach browser downloads only particular feature's javascript. Not all the javascripts.

Based on your application requirement you can pick one of the option. IMHO I would suggesst second option.

0

精彩评论

暂无评论...
验证码 换一张
取 消