]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/account/ChangePasswordPage.java
upd: enforce a more strict Form call pattern.
[gigi.git] / src / org / cacert / gigi / pages / account / ChangePasswordPage.java
index a88d6a24c0011f3850478cd2d84170c8bb1c229c..60cfaa0b33ceacd7735685ebad8aca9d690fa6d1 100644 (file)
@@ -7,16 +7,15 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.cacert.gigi.dbObjects.User;
-import org.cacert.gigi.output.template.Form;
-import org.cacert.gigi.pages.Page;
+import org.cacert.gigi.pages.ManagedFormPage;
 import org.cacert.gigi.util.AuthorizationContext;
 
-public class ChangePasswordPage extends Page {
+public class ChangePasswordPage extends ManagedFormPage {
 
     public static final String PATH = "/account/password";
 
     public ChangePasswordPage() {
-        super("Change Password");
+        super("Change Password", ChangeForm.class);
     }
 
     @Override
@@ -24,11 +23,6 @@ public class ChangePasswordPage extends Page {
         new ChangeForm(req, getUser(req)).output(resp.getWriter(), getLanguage(req), new HashMap<String, Object>());
     }
 
-    @Override
-    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
-        Form.getForm(req, ChangeForm.class).submitProtected(resp.getWriter(), req);
-    }
-
     @Override
     public boolean isPermitted(AuthorizationContext ac) {
         return ac != null && ac.getTarget() instanceof User;