newUserTable.setWidget(5, 1, confirmPassword);
confirmPassword.addKeyDownHandler(new KeyDownHandler() {
public void onKeyDown(KeyDownEvent event) {
if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
OpenIdUtil openIdUtil = new OpenIdUtil();
if (newUserID.getText().trim().equals("") || newUserPassword.getText().trim().equals("") || confirmPassword.getText().trim().equals("")) {
MessageBox.alert("Please enter both a user name and a password.");
}
else if (isLoginWithHttps) {
openIdUtil.createNewUserToAssociateOpenIdWithHttps(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
}
else {
openIdUtil.createNewUserToAssocOpenIdWithEncryption(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
}
}
}
});
Button register = new Button("Register", new ButtonListenerAdapter() {
@Override
public void onClick(Button button, EventObject e) {
OpenIdUtil openIdUtil = new OpenIdUtil();
if (newUserID.getText().trim().equals("") || newUserPassword.getText().trim().equals("") || confirmPassword.getText().trim().equals("")) {
MessageBox.alert("Please enter both a user name and a password.");
}
else if (isLoginWithHttps) {
openIdUtil.createNewUserToAssociateOpenIdWithHttps(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
}
else {
openIdUtil.createNewUserToAssocOpenIdWithEncryption(newUserID.getText().trim(), newUserPassword, confirmPassword, newUserEmailID.getText().trim(), win);
}
}
});
Button cancel = new Button("Cancel", new ButtonListenerAdapter() {