问题标签 [gwt-2.8]

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 投票
1 回答
694 浏览

java - GWT Compiler : when is a compilation error fatal?

I'm trying to understand more about how GWT compilation works.

More specifically, I want to know how does GWT decide that a particular error is fatal, and the app compilation should fail because of it, and how does it decide that compilation is successful, even though there are compilation errors.

The reason I'm asking is that it's very difficult to distinguish legitimate errors in my log when doing a search, from ones that don't seem to cause any problem.

I'm talking about GWT 2.7 and GWT 2.8 (which I've seen they exhibit the same behavior). Also, I'm using GWTP 1.5.3, if this is relevant somewhat.

A concrete example: I have this error in my logs:

The error above does not make my app to fail compilation, and myApp works just fine (the class is something that registers some GIN bindings, which also work).

Why didn't GWT failed my compilation when it encountered that error?

Additionally, I also have other errors such as:

These errors also don't fail my compilation. Why?

Edit1: forgot to add.

I'm tempted to guess that compilation fails when the error is in something directly reachable from an entry point, and that compilation is OK when that code is not reachable. However, I have the counter-example of code with annotations. I have code that IS reachable from the entry point, and has annotations whose source code is not available, and yet the compilation succeeds (although this is the only exception that I could find so far).

0 投票
1 回答
508 浏览

javascript - 从 js 文件代码调用 gwt 函数。[错误不是函数]

我正在尝试从外部 js 调用我的 GWT 函数。但我收到错误 ****window.myFunction** is not a function**

我的js 文件

我的java文件是:

}

我的location.html文件

我错过了我的代码中的某些内容吗?

谢谢。

0 投票
1 回答
96 浏览

datagrid - GWT 2.8 dropevent 数据传输 null

我正在尝试从作为 FocusPanel 小部件的 DataGrid 中拖放一个元素。目标是另一个 DataGrid,它是 DialogBox 中包含的另一个 FocusPanel 的小部件。onDragStart 方法工作正常。我可以使用调试器 (Firefox 53.0) 检查 dataTransfer 对象是否填充了 DragStartEvent 的 setData 方法。在目标一侧,正确调用了 onDrop 方法。问题是 dataTransfer 对象为 null 并且 DropEvent 的 getData 方法返回错误。我不明白为什么 dataTransfer 对象为空。

0 投票
1 回答
455 浏览

java - GWT 2.8 无法使自定义链接器工作

我有一个自定义链接器来生成一个在 GWT 2.7 之前可以正常工作的清单文件。当我更改为 GWT 2.8 时,我注意到它停止生成文件 myapp.manifest。

在 module.gwt.xml 我有

这是2.7上的编译日志

在 GWT 2.8 上,我使用tbroyer gwt maven archetype modules-webapp。链接器类是在客户端模块下定义的,但在外部的包上

在编译日志中我看不到以下行:

我想这表明它没有被调用?

链接器类 AppManifest.java

非常感谢任何帮助!

0 投票
0 回答
270 浏览

java - Maven 的 GWT 编译错误:没有定义 Presenter 的实例。忘记注释@Presenter 或@EventHandler?

从 Ant Ivy 迁移到 Maven 构建工具。

关于项目的小信息:

  1. 具有很少部署工件的多模块项目。
  2. 在 Ant Ivy 上一切正常,编译和部署正常。

使用 2.7.0 GWT 版本在 Maven 上成功迁移。将版本增加到 2.8.1 后,盯着 gwt 编译错误。

第 137 行包含Mvp4gModule module = GWT.create(Mvp4gModule.class);

尝试修复:
1. 比较来自 Ant Ivy 的类路径映射依赖项与 Maven 类路径,一切都相同。所有版本的依赖和插件都很好,没有任何冲突。
2. 尝试使用两个不同的 gwt maven 插件,但使用任何配置都会出现相同的错误:

主要的奇怪是Ant编译成功。Ant 的 compile-gwt 目标与 Maven 的 gwt-plugin 具有相同的配置和参数。

0 投票
0 回答
27 浏览

google-chrome - 升级到 GWT 2.8 后 Chrome 和 Safari 中的标签页无响应

最近我尝试升级到 GWT 2.8,但遇到了一个问题,即少数用户报告 Chrome 55.0.2883.95 和 Safari 10.0.2 中的浏览器选项卡挂起(最终显示终止/等待弹出窗口)。似乎主要影响 Mac 用户。回到 GWT 2.7 使问题消失了。我自己无法重现这个问题,所以这似乎不是一个普遍的问题。有人升级后遇到过类似的情况吗?

0 投票
1 回答
195 浏览

gwt - What is the best way to customize or entirely skip GWT's *.nocache.js

Here's the deal - we have only one permutation so there is no need to perform any browser detection. We are optimizing for mobile devices and latency and network bandwidth are a problem. We have an alternate way to obtain the main fragment other than using an HTTP request and would like to utilize that but *.nocache.js only knows about creating a script tag that requests it via http.

I was trying to create a custom version of *.nocache.js (presently hacking) that will do enough of a setup to allow us to load the fragment code differently (as just directly loading the fragment does not seem to work, even when I unescape it - all code is inside a list of quoted strings passed to a function call). I managed to get that code running but it fails.

Any ideas?

0 投票
1 回答
1575 浏览

java - 如何在 GWT 中使用 XMLHttpRequest?

XMLHttpRequest 是来自 GWT 客户端的 HTTP 调用的替代方案,并允许控制请求/响应的所有方面。但是如何使用呢?javadoc地址: http: //www.gwtproject.org/javadoc/latest/com/google/gwt/xhr/client/class-use/XMLHttpRequest.html

0 投票
1 回答
130 浏览

gwt - Eclipse / launch / Java Classpath 括在引号中 / 中断 3rd 方工具 / 阻止开发

https://bugs.eclipse.org/bugs/show_bug.cgi?id=558712

在 Eclipse 4.14 中,java.class.path Java 属性包含在启动配置的引号中

更具体地用于 GWT 开发模式启动配置。

我们怀疑类路径足够长,因此为了安全起见将其括在引号中。

但是,这会破坏 GWT 运行本身,因为 gwt-dev 代码会查找类路径并将其拆分,因为期望类路径不包含在引号中。参见https://github.com/gwtproject/gwt/blob/2.8.2/dev/core/src/com/google/gwt/dev/cfg/ResourceLoaders.java的 getClassPath() 方法

这在更新 Eclipse IDE 后开始发生。

我们使用的是 Spring Tool Suite 4 版本 4.5.0,我相信它是基于 Eclipse 4.14 构建的。我们确信生成类路径的部分是 Eclipse IDE 特定的,而不是 Spring Tools 4 特定的。因此,我们清楚地考虑了与 Eclipse 相关的问题。

这目前阻碍了我们的开发工作,并危及我们商业项目的交付,因为我们的开发人员无法在他们的开发机器上运行我们的应用程序。

我们认为这是与 Eclipse JDT 相关的东西,在最近的 Eclipse JDT 版本中一定已经发生了变化,因为这曾经在大约一个月前或更短的时间内工作

有没有人经历过类似的事情?

0 投票
1 回答
119 浏览

gwt - 更改 GWT/SmartGWT 中样式表的加载顺序

我在我的应用程序中使用 GWT 和 SmartGWT。我想将应用程序版本升级为 GWT 从2.6.1 到 2.8.2和 SmartGWT 从5.0 到 6.1。我已成功迁移它,但面临一些 UI 问题。

.gwt.xml 文件如下所示。

早些时候,它作为 GWT/SmartGWT 依次加载样式表和 JS,然后是我的自定义样式表和 JS。但升级后它会先加载自定义 CSS 和 JS,然后再加载 GWT/SmartGWT。正因为如此,UI 像以前一样工作。

任何人都有任何想法,如何更改加载顺序?我也尝试过从 .gwt.xml 更改上述文件序列,但没有价值。

提前致谢!