public void run() {
   try {
     char[] oldPassword = showOld ? ui.getOldPassword() : new char[0];
     char[] p1 = ui.getNewPassword();
     char[] p2 = ui.getPasswordVerification();
     if (!Tools.match(p1, p2)) throw new RaplaException(getString("error.passwords_dont_match"));
     getUserModule().changePassword(user, oldPassword, p1);
     dlg.close();
   } catch (RaplaException ex) {
     dialogUiFactory.showException(ex, new SwingPopupContext((Component) dlg, null));
   }
 }
 public void start() throws RaplaException {
   ui =
       new PasswordChangeUI(
           getClientFacade(), getI18n(), getRaplaLocale(), getLogger(), showOld);
   dlg =
       dialogUiFactory.create(
           popupContext,
           true,
           ui.getComponent(),
           new String[] {getString("change"), getString("cancel")});
   dlg.setDefault(0);
   dlg.setTitle(getI18n().format("change.format", getString("password")));
   dlg.getAction(0).setRunnable(this);
   dlg.getAction(1).setIcon("icon.cancel");
   dlg.start(true);
 }