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 a5484c2fe0
commit 4e40c8e123

View file

@ -817,6 +817,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");