Fix ClassCastException on EffortDurationBox

It only happens with ZK5. Marshal and unmarshal are needed.

FEA: ItEr75S08MigrationZK5
This commit is contained in:
Óscar González Fernández 2011-06-28 19:39:58 +02:00
parent 129550fd99
commit b709cbc5ed

View file

@ -31,6 +31,21 @@ public class EffortDurationBox extends Textbox {
return (EffortDuration) getTargetValue();
}
@Override
protected Object marshall(Object value) {
return coerceToString(value);
}
@Override
protected Object unmarshall(Object value) {
EffortDuration result = EffortDuration
.parseFromFormattedString((String) value);
if (result == null) {
return EffortDuration.zero();
}
return result;
}
@Override
protected Object coerceFromString(String value) throws WrongValueException {
EffortDuration result = EffortDuration.parseFromFormattedString(value);