[Bug #987] Don't select hour type if there are no items in the list of hours type
FEA: ItEr74S04BugFixing
This commit is contained in:
parent
e012576195
commit
71082a7470
2 changed files with 10 additions and 0 deletions
|
|
@ -268,6 +268,11 @@ public class CostCategoryCRUDController extends GenericForwardComposer
|
|||
lbHoursType.renderAll();
|
||||
lbHoursType.applyProperties();
|
||||
|
||||
if (lbHoursType.getItems().isEmpty()) {
|
||||
row.appendChild(lbHoursType);
|
||||
return;
|
||||
}
|
||||
|
||||
// First time is rendered, select first item
|
||||
TypeOfWorkHours type = hourCost.getType();
|
||||
if (hourCost.isNewObject() && type == null) {
|
||||
|
|
|
|||
|
|
@ -1169,6 +1169,11 @@ public class WorkReportCRUDController extends GenericForwardComposer implements
|
|||
lbHoursType.renderAll();
|
||||
lbHoursType.applyProperties();
|
||||
|
||||
if (lbHoursType.getItems().isEmpty()) {
|
||||
row.appendChild(lbHoursType);
|
||||
return;
|
||||
}
|
||||
|
||||
// First time is rendered, select first item
|
||||
TypeOfWorkHours type = workReportLine.getTypeOfWorkHours();
|
||||
if (workReportLine.isNewObject() && type == null) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue