GWT MVP Presenter 无法更新视图列表框组件
我正在使用 gwt-platform 库编写一个 GWT MVP 应用程序(一旦习惯了它就非常好)。当我的演示者尝试更新列表框的内容时,会出现问题。该问题出现在以下文件的第 66 行:
我确信应用程序正在调用 onSuccess() 方法(调试器中的断点有效),并且结果已填充。
我注意到的一件事是关联的视图 MapmakerStackPanelViewImpl2.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:
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:
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是有两个视图副本四处浮动。我使用 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.