按字母排序
for(TdSysOperator t : list){
lv = new LabelValueBean(StringUtils.join(new String[] {GB2Alpha.getFirstChinesePinYinChar(t.getName()), "-",
t.getName() }), t.getId());
resultList.add(lv);
}
collectList(resultList);
renderJson(response,resultList);
private void collectList(List<LabelValueBean> resultList){
Collections.sort(resultList,new Comparator<LabelValueBean>() {
public int compare(LabelValueBean o1, LabelValueBean o2) {
return o1.getLabel().compareTo(o2.getLabel());
}
});
}