public String EntityFullController.save() {
log.debug("saving...");
if (current != null) {
try {
String msgKey = validate(current);
if(msgKey == null) {
checkSavePermission(current);
saveEntity(current);
updateCaches(current);
load();
return Constants.SUCC;
} else {
handleError(msgKey);
}
} catch (AuthorizationException e) {
handleException(e, ERROR_UN_AUTHORIZED_ACESS);
} catch (OptimisticLockException e) {
handleException(e, ERROR_OPTIMISTIC_LOCK);
} catch (IOException e) {
handleException(e, ERROR_IN_SAVING_FILE);
} catch (Exception e) {
handleException(e, ERROR_SAVE_FAILED);
}
}
return Constants.FAIL;
}
public void load(Date firstOfWeek) {
this.firstOfWeek = firstOfWeek;
this.calculateStartAndEndDateTime();
// this.events = this.eventDAO.getEvents(startDateTime, endDateTime);
CalendarEventDAO eventDAO1 = (CalendarEventDAO) Component
.getInstance("calendarEventDAO", ScopeType.Page); this.startingEvents = eventDAO1.getStartingEvents(this.startDateTime, endDateTime);
this.endingEvents = eventDAO1.getEndingEvents(this.startDateTime, this.endDateTime);
}