As declaredat http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/ListModels.html#toListSubModel(org.zkoss.zul.ListModel, java.util.Comparator, int),
comparator - used to compare the value typed by user and the value from the model. The first argument is the value typed by user, and the second argument is the value retrieved from the model. It shall return 0 if they matched (i.e., shall be shown).
I tried to filter the model data with "full text matching",and the logs show that CustomerSortComparator works correctly,
But, the chosenbox drop down with empty list.
But if the input value matches the data at the beginning,it will appear in the chosenbox drop down list,
just like the CustomerSortComparator was invoked and ignored!
ListModels.toListSubModel(new ListModelList<String>(dataList, false),new CustomerSortComparator(), 100);