[Bug #969] Refresh box of price per hour instead of doing a reloadBindings of the current row

FEA: ItEr74S04BugFixing
This commit is contained in:
Diego Pino Garcia 2011-04-13 11:58:09 +02:00
parent 9f61475f9a
commit 966844638d

View file

@ -302,9 +302,12 @@ public class CostCategoryCRUDController extends GenericForwardComposer
.getValue() : null;
hourCost.setType(value);
if (value != null) {
// Update the hourPrice in the hourCost
hourCost.setPriceCost(value.getDefaultPrice());
Util.reloadBindings(listHourCosts);
final BigDecimal defaultPrice = value.getDefaultPrice();
final Decimalbox dbPricePerHour = (Decimalbox) item.getParent().getNextSibling();
hourCost.setPriceCost(defaultPrice);
if (dbPricePerHour != null) {
dbPricePerHour.setValue(defaultPrice);
}
} else {
hourCost.setPriceCost(BigDecimal.ZERO);
throw new WrongValueException(item.getParent(),