首页 > 解决方案 > Vaadin Flow UnsupportedOperationException:确认来自客户端的重复消息

问题描述

我想使用带有 Button 的 Anchor 元素作为子元素,但在这种情况下我遇到了异常:

java.lang.UnsupportedOperationException:确认来自客户端的重复消息。预期同步 id:2,得到 1。消息开始:{“csrfToken”:“992caf41-4b1c-4b1e-97da-04c83c55301a”,“rpc”:[{“type”:“event”,“node”:10,事件":"点击","数据":{"event.shiftKey":false,"event.metaKey":false,"event.detail":1,"event.ctrlKey":false,"event.clientX": 693,"event.clientY":166,"event.altKey":false,"event.button":0,"event.screenY":262,"event.screenX":693}}],"syncId":1 “客户标识”:1}

这是我的元素的源代码:

Button button = new Button("Rules");
Anchor anchor = new Anchor("/rules", button);

我的课程来源:https ://pastebin.com/G8zU0csP

我正在使用 Vaadin 14.0.5 谁能帮我解决这个问题?

标签: javavaadinvaadin-flowvaadin10

解决方案


您是否将button和都添加anchor到 UI 中?如果是这种情况,那么您应该只anchor直接添加。这似乎对我有用,没有任何问题

Button button = new Button("Title");
Anchor anchor = new Anchor("https://stackoverflow.com/questions/58684723/vaadin-flow-unsupportedoperationexception-confirmed-duplicate-message-from-the", button); add(anchor);

你能在你的例子中添加更多细节吗?Anchor 中的 URL 是什么?


推荐阅读