private void onSave() {
if(validateEntry() == false) {
return;
}
BOUser user = new BOUser();
if(lstUsers.getSelectedValue() != null) {
user = (BOUser)lstUsers.getSelectedValue();
}else {
user.setPassword("zycus123");
}
user.setLoginName(userName.getText());
user.setUserType((UserType)userType.getSelectedItem());
user.getContact().setFirstName(userFirstName.getText());
user.getContact().setLastName(userLastName.getText());
user.getContact().setPhoneNumber(userPhone.getText());
user.getContact().setContactMobile(userMobile.getText());
if(userDOB.getSelectedItem() == null) {
user.getContact().setDateOfBirth(null);
}else {
user.getContact().setDateOfBirth(new Date(userDOB.getSelectedItem().toString()));
}
userManager.saveUser(ApplicationContext.getCurrentUser(), user);
initReload(user);
}