- vars.put("countryCode", new IterableDataset() {
-
- int i = 0;
-
- @Override
- public boolean next(Language l, Map<String, Object> vars) {
- if (i >= countryCode.length) {
- return false;
- }
- CountryCode t = countryCode[i++];
- vars.put("id", t.getId());
- vars.put("cc", t.getCountryCode());
- vars.put("display", t.getCountry());
- if (t.getCountryCode().equals(c)) {
- vars.put("selected", "selected");
- } else {
- vars.put("selected", "");
- }
- return true;
- }
- });
- // vars.put("countryCode", countryCode);