简体   繁体   English

Vaadin ui 组件不兼容

[英]Vaadin ui components are incompatable

I have a view extended from com.vaadin.flow.component.orderedlayout.VerticalLayout I need to add a component com.vaadin.ui.ListSelect But the ListSelect does not extend Component, so i can't use it on my view.我有一个从 com.vaadin.flow.component.orderedlayout.VerticalLayout 扩展的视图我需要添加一个组件 com.vaadin.ui.ListSelect 但是 ListSelect 没有扩展组件,所以我不能在我的视图中使用它。 How can i arrange compatibility?我该如何安排兼容性?

But the ListSelect does not extend Component但是 ListSelect 没有扩展 Component

ListSelect extends com.vaadin.ui.Component . ListSelect 扩展com.vaadin.ui.Component Flow requires that your components extend com.vaadin.flow.component.Component . Flow 要求您的组件扩展com.vaadin.flow.component.Component

Based on your package names com.vaadin.ui vs com.vaadin.flow.component it looks like you are mixing up Vaadin 8 and Vaadin 14+ for example (or Vaadin 7 and some other Vaadin 14+ version). Based on your package names com.vaadin.ui vs com.vaadin.flow.component it looks like you are mixing up Vaadin 8 and Vaadin 14+ for example (or Vaadin 7 and some other Vaadin 14+ version).

You may have the both frameworks in your classpath, thus IDE autocompletion suggest you classes from both libraries.您的类路径中可能有这两个框架,因此 IDE 自动补全建议您从两个库中获取类。

If you are developing application with Vaadin 14 or newer, instead of ListSelect component use com.vaaadin.flow.component.select.Select .如果您使用 Vaadin 14 或更高版本开发应用程序,请使用com.vaaadin.flow.component.select.Select代替 ListSelect 组件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM