- res.put("nameExplicit", assuree.getName());
- res.put("name", assuree.getName().toString());
- try {
- res.put("maxpoints", assuree.getMaxAssurePoints());
- } catch (SQLException e) {
- e.printStackTrace();
- }
- res.put("dob", sdf.format(assuree.getDob()));
- res.put("dobFmt2", sdf2.format(assuree.getDob()));
+ res.put("names", new ArrayIterable<Name>(assureeNames) {
+
+ @Override
+ public void apply(Name t, Language l, Map<String, Object> vars) {
+ vars.put("nameExplicit", t);
+ vars.put("nameId", t.getId());
+ vars.put("checked", selected[i] ? " checked" : "");
+ }
+
+ });
+ res.put("name", assuree.getPreferredName().toString());
+ res.put("maxpoints", assurer.getMaxAssurePoints());
+ res.put("dob", sdf.format(assuree.getDoB().toDate()));
+ res.put("dobFmt2", sdf2.format(assuree.getDoB().toDate()));
+ res.put("location", location);
+ res.put("date", date);
+ res.put("aword", aword);
+ res.put("countryCode", cs);
+
+ final LinkedList<AssuranceType> ats = new LinkedList<>();
+ for (AssuranceType at : AssuranceType.values()) {
+ try {
+ Notary.may(assurer, assuree, at);
+ ats.add(at);
+ } catch (GigiApiException e) {
+ }
+ }
+ res.put("ats", new IterableDataset() {
+
+ Iterator<AssuranceType> t = ats.iterator();
+
+ @Override
+ public boolean next(Language l, Map<String, Object> vars) {
+ if ( !t.hasNext()) {
+ return false;
+ }
+ AssuranceType t1 = t.next();
+ vars.put("type", t1.getDescription());
+ vars.put("id", t1.toString());
+ vars.put("sel", t1 == type ? " selected" : "");
+ return true;
+ }
+ });