我有以下方法:
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(named = "Find alphabet Soup by Letter", bookmarking = BookmarkPolicy.AS_ROOT)
@MemberOrder(name = "Menu soups", sequence = "7")
public List<SomeObject> findByLetter(@ParameterLayout(named = "letter") final String letter) {
return container.allMatches(new QueryDefault<SoupObject>(SoupObject.class, "findSoupQuery", "letter", letter));
}
我希望参数的输入字段letter
是带有自动完成功能的下拉列表。所以我添加了自动完成功能:
public Collection<String> autoComplete0FindByLetter(@MinLength(3) String search) {
List<String> ret = new ArrayList<String>();
SoupFinder soupFinder = new SoupFinder();
List<SoupObject> soups = soupFinder.findByLetter(search);
for (SoupObject tmpSoup : soups) {
ret.add(tmpSoup.getName(());
}
return ret;
}
所以我现在的问题是:当我findByLetter
在 Wicked UI 中使用该函数时,参数没有下拉字段letter
。为什么没有下拉字段分别为什么自动完成功能不起作用。我是不是忘记了什么?
感谢您的回答。