private void onSave() {
if (validateEntry() == false) {
return;
}
BOProject project = new BOProject();
if (lstProjects.getSelectedValue() != null) {
project = (BOProject) lstProjects.getSelectedValue();
}
project.setProjectName(projectName.getText());
BOUser oldOwner = project.getProjectOwner();
project.setProjectOwner((BOUser) projectOwner.getSelectedItem());
project.setProjectCompany((BOCompany) projectCompany.getSelectedItem());
project.setProjectStartDate(projectStartDate.getDate());
project.setProjectEndDate(projectEndDate.getDate());
project.setProjectType((ProjectType) projectType.getSelectedItem());
project.setProjectStatus((ProjectStatus) projectStatus.getSelectedItem());
project.setProjectPriority((Priority) projectPriority.getSelectedItem());
project.setProjectDescription(projectDescription.getText());
project.setContactUsers(currentUsers);
Set<BODepartment> projectDepartments = new LinkedHashSet<BODepartment>();
projectDepartments.add((BODepartment) departmentCombo.getSelectedItem());
project.setProjectDepartments(projectDepartments);
projectManager.saveProjectInfo(ApplicationContext.getCurrentUser(), oldOwner, project);
initReload(project);
}