可以将一个节点从一个状态树移动到另一个状态树。如果是故意的,请首先通过调用removerfromtree从其当前状态树中删除节点
当我从两个帐户登录到我的vaadin应用程序时,我会收到此错误消息
无法将节点从一个状态树移动到另一个状态树。如果是 故意,首先通过其当前状态树删除节点 调用removefromtree
了解有关调用错误的更多信息: 使用Google OAuth2登录 从用户A帐户登录到应用程序时,一切正常,一旦我同时从用户B的帐户登录应用程序,我
从消息中了解了一条错误消息,我有了常见的接口对象我必须为每个传入用户清理或创建新的,
也许有一些有关实现几个用户同时使用的应用程序的教程或类似的东西?
When I log in from two accounts to my vaadin app I get this error message
Can't move a node from one state tree to another. If this is
intentional, first remove the node from its current state tree by
calling removeFromTree
Learn more about calling the error:
Logging in with Google OAuth2
When logging in to the application from user A's account, everything works fine, as soon as I log in to the application from user B's account at the same time, I get an error message
As I understand from the message, I have common interface objects that I have to clean up or create new ones for each incoming user
Maybe there is some tutorial on implementing an application that is used by several users at the same time or something similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Vaadin不允许共享组件。这是在单个内部
UI状态树(该组件将被移动,而不是在
两个位置)。
对于在不同的不同之间共享组件尤其如此
UI状态树。结果是您到达那里的错误。
(偶然)共享组件的主要嫌疑人是:
static
变量或仅此处的事物一次,例如
enum
s;通常情况下,开发人员只想保留一个周围或“保存”资源(例如不要说
vaadinicons.cogs.create()
在您的enum
中。只是使用vaadinicons.cogs
,然后在其上调用create()
,每当您时将一个添加到UI。
要查看关于春季的文档
范围;
通常所有内容“下”
@uiscope
应该没问题(这也包括
原型
之类的“无害”范围。还要注意,问题始终与组件一起
组件本身在其他组件之外使用的内容。没关系
具有原型:D
Textfield
使用SingletonI18NService
。这些错误非常偷偷摸摸,因为开发人员往往只有
曾经通过一个会话/UI进行测试,并且一旦应用程序进入
居住。给定的错误消息实际上是没有用的
附带的调试器的应用程序。
Vaadin does not allow sharing components. This is true inside a single
UI state tree (the component will be moved instead of being visible on
two locations).
And this is especially true for sharing components between different
UI state trees. The result is the error you got there.
Prime suspects for (accidentally) sharing components are:
static
variables, or things, that are only thereonce, like
enum
s; usually things, developers only want to keep onething around or "save" resources (e.g. don't put
VaadinIcons.COGS.create()
in yourenum
. Just useVaadinIcons.COGS
and then call the.create()
on it, whenever youadd one to the UI.
to check out the docs about the Spring
scopes;
usually everything "under"
@UIScope
should be fine (this alsoincludes "harmless" scopes like
prototype
.Note also, that the problem is always with the component, not with
what the component itself uses outside of other components. So it's OK
to have a prototype:d
TextField
using a singletonI18NService
.Those kind of errors are quite sneaky, since developers tend to only
ever test with one session/UI and tend to creep up once the app goes
live. And the given error message is practically useless outside an
application with a debugger attached to it.