Bug #1357: Check if the date is out of the visualization area, and in that case

set a new date before updating the legend.

FEA: ItEr76S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2012-01-30 12:32:57 +01:00
parent fe090c4c85
commit da19a371ae

View file

@ -816,6 +816,19 @@ public class OrderPlanningModel implements IOrderPlanningModel {
}
private void updateEarnedValueChartLegend() {
try {
//force the validation again (getValue alone doesn't work because
//the result of the validation is cached)
earnedValueChartLegendDatebox.setValue(
earnedValueChartLegendDatebox.getValue());
}
catch (WrongValueException e) {
//the user moved the gantt and the legend became out of the
//visualization area, reset to a correct date
earnedValueChartLegendDatebox.setValue(earnedValueChartFiller.
initialDateForIndicatorValues().toDateTimeAtStartOfDay()
.toDate());
}
LocalDate date = new LocalDate(earnedValueChartLegendDatebox.getRawValue());
org.zkoss.zk.ui.Component child = earnedValueChartLegendContainer
.getFellow("indicatorsTable");