/**
* process which sends changerequest to server.
*/
public void confirmProcess() {
getCore().getNetwork().makeContact();
UpdateDataRequestMessage udrm = new UpdateDataRequestMessage();
Pattern pWord = Pattern.compile("[a-zA-Z_0-9]*");
Pattern pEmail = Pattern.compile("^\\S+@\\S+$");
Matcher mPassword = pWord.matcher(String.valueOf(lPassword
.getPassword()));
Matcher mEmail = pEmail.matcher(lEmail.getText());
boolean pMatchesPwd = mPassword.matches();
boolean pMatchesEmail = mEmail.matches();
if (!pMatchesPwd) {
errorDialog("only a-zA-Z and 0-9 is allowed");
lPassword.requestFocus();
} else if (!String.valueOf(lPassword.getPassword()).equals(
String.valueOf(lPassword2.getPassword()))) {
errorDialog("The passwords you entered weren't identical");
lPassword.requestFocus();
} else if (!pMatchesEmail && !lEmail.getText().equals("")) {
errorDialog("Not a valid email address!");
lEmail.requestFocus();
} else if (loldPassword.equals(String.valueOf(lPassword.getPassword()))) {
errorDialog("Your actual password and your "
+ "new password are the same!");
lEmail.requestFocus();
} else {
if (lEmail.getText().equals(null)) {
lEmail.setText("");
udrm.setEmail(lEmail.getText());
} else {
udrm.setEmail(lEmail.getText());
}
if (String.valueOf(lPassword.getPassword()).equals(null)) {
udrm.setPassword("");
} else {
udrm.setPassword(String.valueOf(lPassword.getPassword()));
}
if (String.valueOf(loldPassword.getPassword()).equals(null)) {
udrm.setOldPassword("");
} else {
udrm.setOldPassword(String.valueOf(loldPassword.getPassword()));
}
udrm.setClientId(getCore().getPlayerId());
getCore().getNetwork().sendMessage(udrm);
confirm.setEnabled(false);
}