我尝试使用jQuery注册一个onClick处理程序,它的功能应该是更改URL中的查询字符串,并在为window.location.href分配新URL的同时启动重新加载。
// sets a new URL with lang as query parameter indicating the language
setNewLang: function( lang ) {
var that = this;
// the url that shall be changed
var url = window.location.href;
// save possibl
我正在尝试开发一个使用MVP模式的GWT应用程序。到目前为止一切正常,除了一个特定的动作情况:不改变url的动作(不改变浏览器历史记录)。
在GWT MVP模式中,事件从演示者发送,应用程序控制器捕获它们并更新浏览器历史记录。如果历史记录已更改,则视图将更新。
**修改历史的MVP (效果很好)**
Current URL is /list
User clicks on contactdelete button.
Fire DeleteContactAction event.
App controller catches, change history to 'delete'