源文转自:Loading a default view on startup with gwt-presenter
As shown in Chris Lowe’s GWT MVP example, I’ve been using getPlaceManager().fireCurrentPlace() in my EntryPoint class to show the initial view after all presenters are loaded. This works fine if there is a history token (placeId) in the URL; however, on initial load, my URL is empty, so I want to navigate to the default view and mark the Place in History (I chuckle every time I use that phrase). The simplest way to do this is to fire a PlaceRequestEvent, so my GWT EntryPoint class now concludes with this:
// Load PlaceManager so it can start listening
PlaceManager placeManager = injector.getPlaceManager();
String currentPlace = History.getToken();
if ("".equals(currentPlace))
{
// Nothing in URL, load default page
injector.getEventBus().fireEvent(
new PlaceRequestEvent(new PlaceRequest(
ManageListsPresenter.PLACE)));
}
else
{
// Load requested page
placeManager.fireCurrentPlace();
}
My default presenter is contained within a WidgetContainerPresenter, and gwt-presenter calls the appropriate methods to reveal my default view, set it as the current presenter in the container, and update the URL in the address bar. Slick.
分享到:
相关推荐
NULL 博文链接:https://mydownload.iteye.com/blog/1157105
GWT整合Spring时需要这个包,在官网上没有最新的jar包,这是自己用jar命令生成的,并测试可以使用。
现在,该插件被认为是legacy GWT maven plugin (又名mojo GWT maven插件),而新插件被认为是new generation GWT maven plugin (又名tbroyer GWT maven插件)。 仍然支持旧版maven插件,但强烈建议将新插件用于新...
fwefwefwGWT工具GWT工具GWT工具GWT工具GWT工具GWT工具
Ext GWT 2.0: Beginner's Guide is a practical book that teaches you how to use the Ext GWT library to its full potential. It provides a thorough, no-nonsense explanation of the Ext GWT library, what ...
C:\程序开发\Java\gwt-windows-1.4.59 doc(文档目录,开发文档和Java API文档) samples(示例代码目录,非常有名的KitchenSink示例代码即在此目录中) about.html about.txt applicationCreator.cmd ...
gwt ext gwt-ext gwt-ex t学习必备资料gwt ext gwt-ext gwt-ex t学习必备资料gwt ext gwt-ext gwt-ex t学习必备资料gwt ext gwt-ext gwt-ex t学习必备资料gwt ext gwt-ext gwt-ex t学习必备资料gwt ext gwt-ext gwt-...
gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2gxt-2.1.1-gwt2
变量值:D:\project tools\gwt-windows-1.4.60 变量注:这个变量指定GWT的存放路径 二、把下面的两段分别接到环境变量path与classpath 的最后面 path: ;%MAVEN_HOME%\bin;%GWT_HOME;%JAVA_HOME%\bin;%...
gwt-maven-plugin 该插件旨在通过提供两种特定的打包方式: gwt-lib和gwt-app ,使使用Maven构建GWT项目更加容易。 基本用法 将插件添加到您的POM并启用扩展: < groupId>net.ltgt.gwt.maven</ groupId> ...
This book is designed to give developers all the information they need to develop their own GAE+GWT applications, with a particular focus on some of the technologies useful for building scalable ...
GWT调试插件,适用于firefox3.x GWT浏览器插件 gwt-dev-plugin for Firefox3.0
最好的gwt-ext学习资料,适合初学者。
cypal.studio.for.gwt-1.0
gwt-dev-plugin是GWT针对浏览器的安装插件,包含IE、FireFox、Chrome的。不需要的匆下,非学习文档
GWT-Developer-Plugin
gwt-websocket-exercise 用于GWT培训的简单GWT Websocket练习 依赖于realityforge的gwt-websocket实现: 在Eclipse中设置Realityforge / gwt-websockets项目 在项目中:在类路径上添加GWT SDK,启用GWT支持 删除...
原地址如下 http://google-web-toolkit.googlecode.com/files/gwt-dev-plugin-1.26-rc1.xpi
gwt-dev-plugin