]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/wot/AssuranceForm.java
UPD: Move some template classes to there reightful place.
[gigi.git] / src / org / cacert / gigi / pages / wot / AssuranceForm.java
index 3020390d28b9855b8a1fb8985661bf188414bb9e..a5fd52d241ec4b8a91c16d20b5add2ecae5b5223 100644 (file)
@@ -1,7 +1,6 @@
 package org.cacert.gigi.pages.wot;
 
 import java.io.PrintWriter;
-import java.sql.SQLException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -13,7 +12,7 @@ import org.cacert.gigi.GigiApiException;
 import org.cacert.gigi.dbObjects.Name;
 import org.cacert.gigi.dbObjects.User;
 import org.cacert.gigi.localisation.Language;
-import org.cacert.gigi.output.Form;
+import org.cacert.gigi.output.template.Form;
 import org.cacert.gigi.output.template.Template;
 import org.cacert.gigi.pages.Page;
 import org.cacert.gigi.util.Notary;
@@ -31,9 +30,9 @@ public class AssuranceForm extends Form {
         templ = new Template(AssuranceForm.class.getResource("AssuranceForm.templ"));
     }
 
-    public AssuranceForm(HttpServletRequest hsr, int assuree) {
+    public AssuranceForm(HttpServletRequest hsr, User assuree) {
         super(hsr);
-        this.assuree = new User(assuree);
+        this.assuree = assuree;
         assureeName = this.assuree.getName();
         dob = this.assuree.getDob();
     }
@@ -48,11 +47,7 @@ public class AssuranceForm extends Form {
         res.putAll(vars);
         res.put("nameExplicit", assuree.getName());
         res.put("name", assuree.getName().toString());
-        try {
-            res.put("maxpoints", assuree.getMaxAssurePoints());
-        } catch (SQLException e) {
-            e.printStackTrace();
-        }
+        res.put("maxpoints", assuree.getMaxAssurePoints());
         res.put("dob", sdf.format(assuree.getDob()));
         res.put("dobFmt2", sdf2.format(assuree.getDob()));
         templ.output(out, l, res);
@@ -82,8 +77,6 @@ public class AssuranceForm extends Form {
         try {
             Notary.assure(Page.getUser(req), assuree, assureeName, dob, pointsI, req.getParameter("location"), req.getParameter("date"));
             return true;
-        } catch (SQLException e) {
-            e.printStackTrace();
         } catch (GigiApiException e) {
             e.format(out, Page.getLanguage(req));
         }