不要在 GWT 中更改 URL
Don't change URL on Place change in GWT
我有一个关于 GWT 的问题。在 GWT 中,当我导航到新位置时,它会更改浏览器栏中的 URL 地址。那么有什么解决方案可以在去新地方时不更改 URL 。 goTo 方法的代码示例如下。
@Override
public void onFailure(Throwable caught) {
super.onFailure(caught);
ForbiddenPlace forbiddenPlace = new ForbiddenPlace();
goTo(forbiddenPlace);
}
如果你使用PlaceController.goTo
方法,它会在eventBus中触发一个PlaceChangeEvent
,这将被PlaceHistoryHandler
和ActivityManager
使用。 PlaceHistoryHandler
正在更新 URL (Historian
),所以...如果您只想显示地点而不更新 URL (Historian
) 您可以使用 ActivityManager.onPlaceChange(new PlaceChangeEvent(new ForbiddenPlace()))
.
手动将位置提供给您的 ActivityManager
我有一个关于 GWT 的问题。在 GWT 中,当我导航到新位置时,它会更改浏览器栏中的 URL 地址。那么有什么解决方案可以在去新地方时不更改 URL 。 goTo 方法的代码示例如下。
@Override
public void onFailure(Throwable caught) {
super.onFailure(caught);
ForbiddenPlace forbiddenPlace = new ForbiddenPlace();
goTo(forbiddenPlace);
}
如果你使用PlaceController.goTo
方法,它会在eventBus中触发一个PlaceChangeEvent
,这将被PlaceHistoryHandler
和ActivityManager
使用。 PlaceHistoryHandler
正在更新 URL (Historian
),所以...如果您只想显示地点而不更新 URL (Historian
) 您可以使用 ActivityManager.onPlaceChange(new PlaceChangeEvent(new ForbiddenPlace()))
.
ActivityManager