我想使用带有 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 添加了 button
和 anchor
?如果是这种情况,那么您应该直接添加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/