【发布时间】:2014-08-18 09:12:32
【问题描述】:
我是新的 Vaadin 开发人员,我遇到了一个小问题,希望可以在这里解决。
实际上,我有一个组合框,其中包含一些数据和一个过滤器,可以找到一些匹配项,所以...我需要在组合框中输入需要的用户的新值。问题是我无法输入新值,因为当我这样做时,我的过滤器正在删除我的新提案。
我的代码...
//Select select_editable = new Select();
ComboBox cbEducation = new ComboBox();
cbEducation.setTextInputAllowed(true);
cbEducation.setNewItemsAllowed(true);
cbEducation.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS);
//Fill the component with some items.
for (int i = 0; i < planets.length; i++)
for (int j = 0; j < planets.length; j++) {
cbEducation.addItem(planets[j] + " to " + planets[i]);
}
//select_editable.
mainLayout.addComponent(cbEducation, 1, 0);
mainLayout.setComponentAlignment(cbEducation, new Alignment(33));
我希望有人可以帮助我...无论如何感谢阅读
提前致谢!
【问题讨论】:
标签: java javascript html vaadin