问题标签 [gwt-history]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
404 浏览

gwt - 带有 I18N GWT 的 TreeItem

我想知道如何使用 I18N 构建 TreeItem 并且菜单项没有不同的标记。

如果我像这样构建 TreeItem:

当用户单击“创建”节点时我得到的 ValueChange 令牌是“创建”,然后我得到类似的代码

...

但是,如果我想在 TreeItem 节点中使用不同的语言,那么我想要文本以外的其他东西作为标记,也许是一个 id。我可以使用 MVP 模式中的 Places 模式来解决这个问题,如果可以,它是如何工作的?

0 投票
1 回答
783 浏览

gwt - GWT - Why this history doesnt work?

I am been trying history on GWT. I find this approch really nice to implement. Unfortunatly, my code doesnt work.

This my actual code :

When i try to load #apartment, I get :

1 - If i well understand, when i use History.newItem() i call the onValueChange() right? So why didn't work?

2 - The class History is static? So i don't have to pass it any time; and can I call it in any contest of my application?

0 投票
3 回答
896 浏览

gwt - GWT - 关于超链接的两个问题 - 管理其历史令牌参数 + 将其插入跨度

我需要在 GWT 中管理一个超链接对象。我需要的是:

1 - 将其添加到跨度中(如 InlineLabel)

我试过Hyperlink affitta_3_span_1=new Hyperlink(result.get(i)[0], "");了,但它创造了这样的东西:

事实上我需要这个:

2 - 管理超链接历史令牌

我把我的内部链接放在这样的地方,Hyperlink affitta_3_span_1=new Hyperlink(result.get(i)[1], "article/"+result.get(i)[0])但是当他们调用 onValueChange() 函数时,我不知道如何在令牌上获取参数。我该怎么做?

干杯

0 投票
3 回答
2610 浏览

gwt - GWT - 历史第一个令牌的问题

我有这个问题:当我调用 Content 类时(由于#param,决定查看哪个页面的那个)我做了这样的事情:

所以,现在,如果我查看浏览器的导航栏,我看到了http://localhost:8084/GWT/?gwt.codesvr=127.0.0.1:9997#homepage。没错。不幸的是,如果我按下Back浏览器,我会看到它加载了以前的地址,例如http://localhost:8084/GWT/?gwt.codesvr=127.0.0.1:9997

我在开始时有一种“假”页面。

1 - 我该如何解决?并使用默认令牌启动应用程序,或将其从历史记录中删除。或者只是在onValueChange有空令牌时调用该方法,然后用一种 switch/if-else 来决定工作流程。

2 - 作为相关问题,当我调用History.addValueChangeHandler(this);构造函数类时,netbeans 说“在构造函数中泄漏这个”。这是什么意思?

干杯

0 投票
3 回答
1098 浏览

java - Preserving navigation/history state in GWT with MVP pattern

I've implemented a basic GWT app based on on the MVP pattern Google recommends. What I'm trying to figure out is the best way to store navigation/history state once you fill your application with data.

Let's say you have a search that returns a bunch data into a CellTable. If I navigate to a specific item in the search result to another panel, the initial Panel with the search result is gone unless the Presenter/View is stored somewhere so I can access it easily on a back navigation.

So, my question is, what do apps like Gmail do to preserve the state for back navigation? Are there any examples of how this can be implemented?

0 投票
2 回答
469 浏览

url - GWT 历史问题

当我添加这样的新历史项目时

History.newItem("注册");

网址正确更改为

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register

并加载注册表

但随后网址会自动更改为

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#

为什么??

因为我想保持

http://127.0.0.1:8888/BiddingSystem.html?gwt.codesvr=127.0.0.1:9997#Register

以便用户可以重新加载

0 投票
1 回答
373 浏览

gwt - GWT 历史问题

是否可以从每个班级添加/创建新的历史令牌?我有一个问题,如果我尝试History.newItem("infoTab")在主类之外创建新令牌(),我得到 NullPointerException(主类包含 onModuleLoad() 方法)。这里的错误信息:

编辑:iframe 部分未添加到 index.html 中。添加后,我得到以下信息:

MainEntry 的第 110 行是:

所以我真的不明白,出了什么问题......没有 iframe 我成功添加了五个历史令牌,如下http://localhost:8080/client/index.html#token1

0 投票
4 回答
2475 浏览

java - 总重量。删除锚部分网址

嗨,我正在使用 GWT 及其标准方式通过“历史”类支持历史。这非常方便,但是如何从 url 中删除锚部分?例如:

我的基本网址:

在使用应用程序时,我移动到一个添加新历史项目的地方。

在代码中:

结果:

我又换了一次地方:

在代码中:

结果:

然后我想回到我的主页(http://www.mysuperwebsite.com/myapp)。

代码中应该放什么?:

回到:

有什么标准的方法可以实现我的目标吗?


如果我添加这样的内容:

或者

网址将变为

这不是我想要的,我需要它没有尖锐的性格。

0 投票
2 回答
948 浏览

gwt - GWT:使用延迟绑定将 AbstractPlaceHistoryMapper 替换为自定义映射器

看起来为 PlaceHistoryMapper 生成的类被硬编码为使用 AbstractPlaceHistoryMapper 作为超类。

所以,我试图通过尝试用我使用延迟绑定的自定义映射器替换这个 AbstractPlaceHistoryMapper 来解决这个问题。我在我的 *.gwt.xml 中使用以下规则:

但由于某种原因,替换似乎没有发生。CustomPlaceHistoryMapper 没有被启动,生成的类仍然使用 AbstractPlaceHistoryMapper。

任何关于可能导致这种行为的想法/指针都非常感谢。

注意:我也在 GWT 组上发布了这个,但到目前为止还没有收到答复。

0 投票
1 回答
979 浏览

url - 如何在 GWT 中为不同页面获取静态 URL 链接

我想建立一个多页面网站,我需要一种方法来引用另一个 GWT 页面(面板)我怎样才能做到这一点,使链接是静态的?