ItEr37S12CUAdministracionCategoriaCosteItEr36S14: fixed the exception thrown when the combobox for TypeOfWorkHours is null
This commit is contained in:
parent
698a43a819
commit
e469b4a9ee
1 changed files with 9 additions and 7 deletions
|
|
@ -227,14 +227,16 @@ public class CostCategoryCRUDController extends GenericForwardComposer
|
|||
public void onEvent(Event event) throws Exception {
|
||||
final Comboitem comboitem = autocomplete.getSelectedItem();
|
||||
|
||||
// Update hourCost
|
||||
HourCost hourCost = (HourCost) row.getValue();
|
||||
hourCost.setType((TypeOfWorkHours) comboitem.getValue());
|
||||
row.setValue(hourCost);
|
||||
if(comboitem != null) {
|
||||
// Update hourCost
|
||||
HourCost hourCost = (HourCost) row.getValue();
|
||||
hourCost.setType((TypeOfWorkHours) comboitem.getValue());
|
||||
row.setValue(hourCost);
|
||||
|
||||
// Update the hourPrice in the hourCost
|
||||
hourCost.setPriceCost(((TypeOfWorkHours) comboitem.getValue()).getDefaultPrice());
|
||||
Util.reloadBindings(listHourCosts);
|
||||
// Update the hourPrice in the hourCost
|
||||
hourCost.setPriceCost(((TypeOfWorkHours) comboitem.getValue()).getDefaultPrice());
|
||||
Util.reloadBindings(listHourCosts);
|
||||
}
|
||||
}
|
||||
});
|
||||
row.appendChild(autocomplete);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue