GWT Multipage App [英] GWT Multipage App
问题描述
我对如何在一个GWT项目中创建多页应用程序感到困惑。我有一个页面与我的应用程序,并希望提供一个选项页面。
我不认为你可以使用2 onModuleLoads()什么的。
那么如何在 1模块中实现多页应用?
谢谢
请看MVP架构 -
http://code.google.com/webtoolkit/articles/mvp-architecture.html
尽管您实际上不需要MVP范例来创建多页gwt应用程序,但在创建应用程序时最好不要使用它。 b
$ b
基本思想是,您创建不同的视图 - 演示者,它们将扮演不同的'页面',并且应用控制器根据您提供的逻辑激活正确的视图。 / p>
编辑 - 您甚至可以用自己的onModuleLoad()创建多个html页面,只有在逻辑上有2个不同的应用程序或者您正在修改现有网页,不能没有它。我相信你根据你的问题没有这些问题。让我知道否则。
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
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.
这篇关于GWT Multipage App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!