GWT MVP Presenter 无法更新视图列表框组件

发布于 2024-11-04 05:38:48 字数 875 浏览 0 评论 0原文

我正在使用 gwt-platform 库编写一个 GWT MVP 应用程序(一旦习惯了它就非常好)。当我的演示者尝试更新列表框的内容时,会出现问题。该问题出现在以下文件的第 66 行:

https://github.com/dartmanx/mapmaker2/blob/master/src/main/java/org/jason/mapmaker/client/presenter/MapmakerStackPanelPresenter2.java

我确信应用程序正在调用 onSuccess() 方法(调试器中的断点有效),并且结果已填充。

我注意到的一件事是关联的视图 MapmakerStackPanelViewImpl2.java 似乎被初始化了两次。我发现自己想知道我是否正在尝试更新未附加到实际用户界面的视图上的控件。该文件位于:

https://github.com/dartmanx/mapmaker2/blob/master/src/main/java/org/jason/mapmaker/client/view/MapmakerStackPanelView2.java

任何帮助将不胜感激。

I am writing a GWT MVP application using the gwt-platform library (very nice once you get used to it). My issue occurs when my presenter attempts to update the contents of a Listbox. The problem occurs on line 66 of the below file:

https://github.com/dartmanx/mapmaker2/blob/master/src/main/java/org/jason/mapmaker/client/presenter/MapmakerStackPanelPresenter2.java

I am sure that the application is calling the onSuccess() method (a breakpoint in the debugger works), and that the result is populated.

One thing I've noticed is that the associated view, MapmakerStackPanelViewImpl2.java, seems to be initialized twice. I find myself wondering if I'm trying to update a control on that view that is not attached to the actual user interface. That file is here:

https://github.com/dartmanx/mapmaker2/blob/master/src/main/java/org/jason/mapmaker/client/view/MapmakerStackPanelView2.java

Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情定在深秋 2024-11-11 05:38:48

问题是有两个视图副本四处浮动。我使用 Gin 将视图注入到演示者的构造函数中,问题就消失了。

The problem was that there were two copies of the view floating around. I used Gin to inject the view into the constructor of the presenter, and problem went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文