フォームのコンパイル中に、すでに使用されている値のリストを表示して、値を挿入できる必要があります(通常のリストボックスの動作)。ただし、新しい値を入力できる必要があるため、aui:autocomplete(以下のコード)を選択しました。
デフォルトでは、「delimChar」セパレータで区切られた複数のアイテムを選択できます。単一の値の選択(または新しい値)を1つに制限する方法はありますか?
var catArray = new Array();
<%for (String s : categoryList) {%>
catArray.push('<%=s%>');
<%} %>
var autoCompleteCategory = new A.AutoComplete(
{
contentBox: '#<portlet:namespace />contactOptions',
input:'#<portlet:namespace/>category',
dataSource: catArray,
delimChar: ',',
typeAhead: true,
}).render();