for(GenericValue cityCategory:cityCategoryList){
Map map = FastMap.newInstance();
List valueList = FastList.newInstance();
String enumCode=cityCategory.getString("enumCode");
for(GenericValue geoCity:geoCityList){
String cityName=geoCity.getString("cityName");
String cityInitial=geoCity.getString("cityInitial");
String cityId=geoCity.getString("cityId");
Map cityMap=FastMap.newInstance();
if(enumCode.contains(cityInitial)){
cityMap.put(cityId, cityName);
valueList.add(cityMap);
}
}
if(valueList.size()>0){
map.put(enumCode, valueList);
list.add(map);
}
}
<#list GeoCitylist as cls>
<#list cls.keySet() as cityI>
<li ><em>${cityI}:</em>
<#list cls.get(cityI) as city>
<#list city.keySet() as cityId >
<span><a href="#" id="${cityId}">${city.get(cityId)}</a></span>
</#list>
</#list>
</li>
</#list>
</#list>