Vaadin流UnsupportedOperationException:确认来自客户端的重复消息

我想将Anchor元素与Button一起用作子元素,但是在这种情况下,我遇到了异常:

  

java.lang.UnsupportedOperationException:确认重复的消息   来自客户。预期同步ID:2,得到1。消息开始:   {“ 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,“事件.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);

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

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

xu741852963 回答:Vaadin流UnsupportedOperationException:确认来自客户端的重复消息

您是否同时将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);

您可以在示例中添加更多详细信息吗?您的锚点中的URL是什么?

本文链接:https://www.f2er.com/3170086.html

大家都在问