简体   繁体   English

GWT默认会自动在浏览器历史记录中放置?

[英]GWT default place automatically in browser history?

Is it normal that the default place is automatically in the browser history at the first position? 默认位置自动位于浏览器历史记录的第一位置是否正常? When I initially call my application I have the possibility to use the back button in my browser. 最初调用应用程序时,可以在浏览器中使用后退按钮。 Then the browser jumps to my default page which is my error page. 然后浏览器跳到我的默认页面,这是我的错误页面。 Is this the normal behavior? 这是正常现象吗?

The history is handled by the browser. 历史记录由浏览器处理。 You have no chance to change it. 您没有机会进行更改。

Maybe you can change your application and use a dialogbox to show your errors, so no entry will be down in the browser history. 也许您可以更改应用程序并使用对话框显示错误,所以浏览器历史记录中不会包含任何条目。

Read the gwt documentation about history. 阅读有关历史记录的gwt文档。 http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsHistory.html http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsHistory.html

Look at: History.addValueChangeHandler(new ValueChangeHandler..... 查看:History.addValueChangeHandler(new ValueChangeHandler .....

Then you need to set history tokens in each view. 然后,您需要在每个视图中设置历史记录令牌。

With this you can change the browser back button behaviour and how you navigate in the app. 借助此功能,您可以更改浏览器后退按钮的行为以及在应用中的导航方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM