Vaadin-8 ComboBox click has no effect

夙愿已清 提交于 2019-12-11 07:29:37

问题


I have a ComboBox in my Vaadin 8 code. allAtts here is a Set of Attendant-s, and the field theAtt in there is of type String:

private ComboBox<Attendant> theCB = new ComboBox<Attendant>(null,allAtts);
theCB.setEmptySelectionAllowed(false);
Binder<SearchArgs> binder = new Binder<SearchArgs>(SearchArgs.class);
binder.setBean(sas);
binder.forField(theCB).bind("theAtt");
.. 
VerticalLayout vl = new VerticalLayout(theCB, rb, deleteBtn);

What's more - this exact flow of theCB is a copy-paste from another class i wrote, on the very same type Attendant.

The problem here is the drop-down click on theCB is not working. That is, clicking that little chevron-down icon on the ComboBox is producing no effect. What could this be!?

I tried removing the other items, rb, deleteBtn in vl. Still didn't work.

Nothing else happening to theCB anywhere else.

TIA.

EDIT: theCB is otherwise functional. typing in the field is allowed, brings the choices and returns the selection accurately.

EDIT-2 https://github.com/vaadin/vaadin-combo-box/issues/680 is not the issue. nothing changing when i pass a non-null label value to the constructor. Besides, it's working fine with null label in that other place in the code.

EDIT-3 Attendant contains several fields, one of which is String att. SearchArgs composes Attendant in a its field theAtt. Attendant.toString() returns att only.

Once again - this exact same logic is working, as i'm typing these, in another part in the code.

Also note: i since also tried the following without success:

  • binding theCB on a separate binder, i.e. declare a second binder on sas and use that one for binding theCB

  • cloning the Attendant objects that go into theCB as data-provider.

来源:https://stackoverflow.com/questions/51467748/vaadin-8-combobox-click-has-no-effect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!