Fixing bug. When the allocations is empty, it does not go directly to advance allocation.

This commit is contained in:
Óscar González Fernández 2009-10-16 03:03:45 +02:00
parent 389d02a74f
commit 855f75c756
2 changed files with 5 additions and 1 deletions

View file

@ -169,7 +169,7 @@ class FormBinder {
this.taskElapsedDays.setDisabled(true);
}
private void doApply() {
void doApply() {
lastAllocation = resourceAllocationsBeingEdited.doAllocation();
aggregate = lastAllocation
.getAggregate();

View file

@ -332,6 +332,10 @@ public class ResourceAllocationController extends GenericForwardComposer {
public void advanceAllocation() {
AllocationResult allocationResult = formBinder.getLastAllocation();
if (allocationResult.getAggregate().isEmpty()) {
formBinder.doApply();
allocationResult = formBinder.getLastAllocation();
}
switcher.goToAdvancedAllocation(allocationResult,
createResultReceiver(allocationResult));
window.setVisible(false);