java - Vaadin 流不支持操作异常 : Confirmed duplicate message from the client

标签 java vaadin vaadin-flow vaadin10

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

java.lang.UnsupportedOperationException: Confirmed duplicate message from the client. Expected sync id: 2, got 1. Message start: {"csrfToken":"992caf41-4b1c-4b1e-97da-04c83c55301a","rpc":[{"type":"event","node":10,"event":"click","data":{"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,"clientId":1}

这是我的元素的源代码:

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

我的类(class)来源:https://pastebin.com/G8zU0csP

我使用的是 Vaadin 14.0.5 谁能帮我解决这个问题吗?

最佳答案

您是否向 UI 添加了 buttonanchor ?如果是这种情况,那么您应该直接添加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 是什么?

关于java - Vaadin 流不支持操作异常 : Confirmed duplicate message from the client,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58684723/

相关文章:

java - 无法命中所需 Controller 的 POST 方法

Java servlet 重定向有错误的 URL 并使用错误的 HTTP 方法

java - Spring为QueueChannel集成多线程

java - Vaadin 添加 HTML 传单 map

spring - 我应该将我的 Vaadin 10+ 静态文件放在哪里?

java - 我怎么知道是什么阻止了 spring webapp 的关闭

java - 清理 Vaadin RichTextArea

vaadin 网格排序 bigDecimal 列

vaadin - 如何在 Vaadin Flow 的 FormLayout 中添加空格?

css - 通过css修改shadowroot元素的样式