public class SiteIconsListDataSource implements PairListDataSource {
public List getValues(HttpServletRequest request) {
File dir = new File(new File(ContextHolder.getContext().getConfDirectory(), "site"), "icons");
List l = new ArrayList();
l.add(new Pair("default", "Default"));
if(dir.exists() && dir.canRead()) {
String[] names = dir.list();
for(int i = 0 ; i < names.length; i++) {
l.add(new Pair(names[i], names[i]));
}
}
return l;
}