问题标签 [gwt-2.5]

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 回答
557 浏览

java - GWT application freezes due to an internal infinite loop

I'm running a GWT application using GWT 2.5.1 and Ext GWT v2.2.4 on Eclipse Juno. Java 6 (32 bit) and I can't change any of this.

I was recently handed over this application which is working fine on another machine. After starting the application (Run > GWT Application), I proceed with logging into my application, my code executes normally but then my app freezes. I debugged and found that the applications enters an infinite loop in this GWT internal method (i.e. in class com.google.gwt.dev.shell.BrowserChannelServer):

messageType is always INVOKE and since the while condition is true, the loop never ends. So the execution is stuck at this stack:

I cleaned the project, deleted cache files, tmp files, recompiled numerous times, tried older version 2.4.0, but I can't try 2.6 because I'll need java 7 which I can't install at the moment. I tried chrome and firefox, same results. After some search I found some suggestions that I should not zoom in using the browser, however, and I'm not doing that.

What could be the problem please ?

0 投票
1 回答
477 浏览

gwt - 未启用 GWT 2.5.1 SuperDevMode

我从事 GWT/GWTPHONEGAP/MGWT 项目,我需要使用带有 SuperdevMode 的 gwt 2.5.1。

我使用 maven 和以下命令“classpath gwt:runco​​deServer”,当我编译我的项目时没有发生错误,但是当我去我的 webBrowser 使用 superDevMode 时,无法重新编译,错误消息是“这个模块没有已启用 Super Dev 模式”尽管我的* .gwt.xml 包含启用了以下行的 superDevMode。

具有以下入口点

当我去 localhost:9876 项目存在并且源可用。

按照我的 Maven 配置:

码头:

和我的 gwt-maven-plugin 配置

0 投票
0 回答
144 浏览

gwt - 使用 GwtQuery 时 gwt 客户端上的通用实体接口

我想要一个简单的通用实体接口,非常像一个地图,例如在 Gwt + GwtQuery 项目中的客户端。

我希望能够将服务器端的任何 pojo 转换为 Map 表单以及一些类型信息,并在客户端将其作为实体检索。实体可以嵌套。

这是可行的吗?

如果是。请给出一些详细的指导方针。

为了进一步阐明,我的目标是拥有一个能够表示来自服务器的各种/不同类型的 pojo 的通用实体接口。这种动态实体的类型信息预计将作为单独的实体在客户端可用。

您认为下面的代码会起作用并达到我的目的吗?如果是 - 下面的 json 文本会是什么样子?

0 投票
1 回答
273 浏览

pdf - 在 gwt 框架中使用突出显示的单词打开 PDF

如何使用 java 或 javascript 在 gwt 框架上打开带有突出显示的单词的 pdf?

我将 url 链接传递给 iframe 并加载 pdf 但没有突出显示

gwt 版本 2.5.1

火狐便携式 v.24

0 投票
1 回答
32 浏览

java - 从 GWT 的 contenteditable 字段的文本中获取带有 LineBreak 的 RAW 文本?

我尝试在 GWT 中做我的笔记本 我们有一个字段,其内容存储在数据库中。如何使用换行符将用户文本传输到服务器?我使用 Document.get().getElementById("note_01").getInnerText() - 它返回单行文本。写:

得到:123,但需要带有换行符的原始文本副本....

或者如何填写这个 contenteditable 字段以获得原始文本?


更新:好的谷歌。我找到了解决方案:在这种情况下,只需要使用 .getInnerHTML() 并将标签替换为服务器端的 \n 即可。谢谢大家!

0 投票
2 回答
107 浏览

gwt - GWT 中的 JS 函数

如何在 GWT 中使用这个简单的 js 函数?(以图片动画脚本为例)

尝试包装

但未捕获的 ReferenceError: startAnimation 未定义

我看过 http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html 但没有找到 js 函数的示例

0 投票
1 回答
112 浏览

gwt - 无法从 intellij idea 2016.3 启动 gwt-2.5 项目

当我尝试运行 gwt 2.5 项目时,我收到警告“当前版本的 GWT 不支持 'good-control' 模块的语言级别。支持的最高级别是 1.6 请重新配置 GWT facet 'GWT' ”,然后按按钮继续,intellij idea 准备文件,我得到一个错误。

连接到目标VM,地址:'127.0.0.1:51180',传输:'socket'

为 GWT-2.5.x 版本运行 GPE 启动器。

未知参数:-sourceLevel Google Web Toolkit 2.5.0 DevMode [-startServer] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir 目录] [-logLevel 级别] [-gen dir] [-bindAddress 主机名或地址] [-codeServerPort 端口号| "auto"] [-superDevMode] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] 模块[s]

0 投票
2 回答
783 浏览

gwt - GWT SelectBox ChangeHandler 事件不起作用

样本:

ChangeHandler 不起作用。尽管在官方示例中它工作正常(http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwListBox )。但它在这段代码中不起作用。没有错误。

这种方式也行不通。

upd:在 MainEntryPoint 类中所有工作,但需要 panel.add(new SomeClass().getWidget()),这不起作用

0 投票
1 回答
410 浏览

java - SyntaxError : Json.parse:unexpected end of data GWT

我在客户端收到“Json.parse:unexpected end of data”,当我使用 GWT 向我的 API 发出休息请求时。

客户端代码:

我的 API 代码:

我在邮递员中调用的相同 API 具有以下值: HEADERs :

要求 :{"applicationIdentiferICC":"jh2b32vy","amount":"100","authCode":"hhbjhbjh","orderNumber":"jhsbhjb","dateTimeInUTC":"03/01/2017 07:20:57","gatewayName":"gatewayname","transactionReference":"asdhgwvg","dealerId":"bhjhahdbj","cardType":"VISA","terminalId":"jjhbjhbhjbj","userReference":"bjhbjh","paymentType":"EMV_CHIP","expMonth":"09","expYear":"19","cardNumber":"1111"}

我得到了预期的回应。

我认为问题是由于“接受”标头造成的。我尝试过使用“ / ”、“application/x-www-form-urlencoded”,但我得到了同样的错误。

我在邮递员中得到的回复:

在浏览器中检查客户端后收到响应头。

我正在使用 GWT 2.5 版本。

我收到以下错误:

在线

0 投票
1 回答
2686 浏览

java - 将 GWT 2.5 Web 应用程序迁移到 Java 10

我有一个使用 GWT-2.5.1 和 Java 8 构建的大量 Web 应用程序。随着 Java 8 的弃用,我需要将其迁移到 Java 10 / 11。

我已经设法克服了一些问题,但我遇到了一个我无法克服的问题。

在构建应用程序时,我收到以下错误:

查看 gwt.xml 文件,对我来说它看起来是正确的:

这与 Java 8 一起编译得非常愉快。我需要做些什么来解决这个问题?