ItEr23S08CUEdicionCalendarioLaboral: Improved reload when creating/editing a calendar. Now it just reload the day information improving the user experience.

This commit is contained in:
Manuel Rego Casasnovas 2009-08-24 10:04:19 +02:00 committed by Óscar González Fernández
parent 7662ff71d5
commit 9133b77940

View file

@ -174,7 +174,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
public void setSelectedDay(Date date) {
baseCalendarModel.setSelectedDay(date);
reloadCurrentWindow();
reloadDayInformation();
}
public Date getSelectedDay() {
@ -212,7 +212,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
// TODO check hours parameter is >= 0
baseCalendarModel.createException(hours);
reloadCurrentWindow();
reloadDayInformation();
}
public List<Days> getHoursPerDay() {
@ -226,7 +226,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
public void removeException() {
baseCalendarModel.removeException();
reloadCurrentWindow();
reloadDayInformation();
}
public HoursPerDayRenderer getHoursPerDayRenderer() {
@ -264,7 +264,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
@Override
public void onEvent(Event event) throws Exception {
reloadCurrentWindow();
reloadDayInformation();
}
});
@ -302,7 +302,7 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
@Override
public void onEvent(Event event) throws Exception {
reloadCurrentWindow();
reloadDayInformation();
}
});
@ -321,6 +321,14 @@ public class BaseCalendarCRUDController extends GenericForwardComposer {
}
}
private void reloadDayInformation() {
if (baseCalendarModel.isEditing()) {
Util.reloadBindings(editWindow.getFellow("dayInformation"));
} else {
Util.reloadBindings(createWindow.getFellow("dayInformation"));
}
}
public void goToCreateDerivedForm(BaseCalendar baseCalendar) {
baseCalendarModel.initCreateDerived(baseCalendar);
if (baseCalendarModel.isDerived()) {