ItEr38S05ValidacionEProbasFuncionaisItEr37S06: Fixing potential problem. Reattaching TaskSource too.

This commit is contained in:
Óscar González Fernández 2009-12-07 18:52:59 +01:00
parent a16407e579
commit 519eb1e28f

View file

@ -37,6 +37,7 @@ import java.util.Map.Entry;
import org.navalplanner.business.orders.daos.IOrderDAO;
import org.navalplanner.business.orders.entities.Order;
import org.navalplanner.business.planner.daos.IResourceAllocationDAO;
import org.navalplanner.business.planner.daos.ITaskSourceDAO;
import org.navalplanner.business.planner.entities.GenericResourceAllocation;
import org.navalplanner.business.planner.entities.ResourceAllocation;
import org.navalplanner.business.planner.entities.SpecificResourceAllocation;
@ -65,6 +66,9 @@ public class ResourceLoadModel implements IResourceLoadModel {
@Autowired
private IOrderDAO orderDAO;
@Autowired
private ITaskSourceDAO taskSourceDAO;
@Autowired
private IResourceAllocationDAO resourceAllocationDAO;
@ -85,6 +89,9 @@ public class ResourceLoadModel implements IResourceLoadModel {
public void initGlobalView(Order filterBy) {
this.filterBy = filterBy;
orderDAO.reattach(filterBy);
if (filterBy.getTaskSource() != null) {
taskSourceDAO.reattach(filterBy.getTaskSource());
}
doGlobalView();
}