ItEr29S06CUAsignacionGrupoRecursosAPlanificacionItEr28S06: Passing the AllocationResult to AdvancedAllocationController.
This commit is contained in:
parent
bd5fd66242
commit
2dfbb35e63
3 changed files with 11 additions and 7 deletions
|
|
@ -25,6 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
import org.navalplanner.web.planner.allocation.AdvancedAllocationController;
|
||||
import org.navalplanner.web.planner.allocation.AllocationResult;
|
||||
import org.navalplanner.web.resourceload.ResourceLoadController;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
|
@ -52,18 +53,18 @@ public class ViewSwitcher implements Composer {
|
|||
isInPlanningOrder = true;
|
||||
}
|
||||
|
||||
public void goToAdvancedAllocation() {
|
||||
public void goToAdvancedAllocation(AllocationResult allocationResult) {
|
||||
planningOrder = ComponentsReplacer.replaceAllChildren(parent,
|
||||
"advance_allocation.zul",
|
||||
createArgsForAdvancedAllocation());
|
||||
createArgsForAdvancedAllocation(allocationResult));
|
||||
isInPlanningOrder = false;
|
||||
}
|
||||
|
||||
private Map<String, Object> createArgsForAdvancedAllocation() {
|
||||
private Map<String, Object> createArgsForAdvancedAllocation(
|
||||
AllocationResult allocationResult) {
|
||||
Map<String, Object> result = new HashMap<String, Object>();
|
||||
result.put("advancedAllocationController",
|
||||
new AdvancedAllocationController(
|
||||
ViewSwitcher.this));
|
||||
new AdvancedAllocationController(this, allocationResult));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,9 +57,12 @@ public class AdvancedAllocationController extends
|
|||
private Grid leftPane;
|
||||
private TimeTrackedTable<FakeData> table;
|
||||
private final ViewSwitcher switcher;
|
||||
private final AllocationResult allocationResult;
|
||||
|
||||
public AdvancedAllocationController(ViewSwitcher switcher) {
|
||||
public AdvancedAllocationController(ViewSwitcher switcher,
|
||||
AllocationResult allocationResult) {
|
||||
this.switcher = switcher;
|
||||
this.allocationResult = allocationResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ public class ResourceAllocationController extends GenericForwardComposer {
|
|||
public void advanceAllocation() {
|
||||
AllocationResult allocationResult = allocationsBeingEdited
|
||||
.doAllocation();
|
||||
switcher.goToAdvancedAllocation();
|
||||
switcher.goToAdvancedAllocation(allocationResult);
|
||||
window.setVisible(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue