AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome", "AppSettings");
AppSettings appRemote = appHome.create();
appRemote.setDataSource(dataSource);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("h:mm a");
Time startTime;
Time endTime;
try {
Date tempDate = simpleDateFormat.parse(dynaform.get("startTime").toString());
startTime = new Time(tempDate.getTime());
} catch (Exception e) {
Date tempDate = simpleDateFormat.parse("8:00 AM");
startTime = new Time(tempDate.getTime());
}
try {
Date tempDate = simpleDateFormat.parse(dynaform.get("endTime").toString());
endTime = new Time(tempDate.getTime());
} catch (Exception e) {
Date tempDate = simpleDateFormat.parse("5:00 PM");
endTime = new Time(tempDate.getTime());
}
appRemote.updateCalendarSettings(startTime.toString(), endTime.toString(), dynaform.get("workingdays").toString());
if (button.equals("save")) {
returnStatus = "save";
FORWARD_final = FORWARD_save;
} else if (button.equals("saveandclose")) {