[英]Vaadin ui components are incompatable
我有一個從 com.vaadin.flow.component.orderedlayout.VerticalLayout 擴展的視圖我需要添加一個組件 com.vaadin.ui.ListSelect 但是 ListSelect 沒有擴展組件,所以我不能在我的視圖中使用它。 我該如何安排兼容性?
但是 ListSelect 沒有擴展 Component
ListSelect 擴展com.vaadin.ui.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).
您的類路徑中可能有這兩個框架,因此 IDE 自動補全建議您從兩個庫中獲取類。
如果您使用 Vaadin 14 或更高版本開發應用程序,請使用com.vaaadin.flow.component.select.Select
代替 ListSelect 組件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.