Fix bug in 'Worker search' screen, close button was not working for limiting resources

FEA: ItEr68S04BugFixing
This commit is contained in:
Diego Pino Garcia 2011-01-20 18:29:41 +01:00
parent ad592e8efc
commit 0decbb958a
2 changed files with 8 additions and 7 deletions

View file

@ -36,6 +36,7 @@ import org.navalplanner.web.planner.allocation.TaskInformation;
import org.navalplanner.web.planner.allocation.TaskInformation.ITotalHoursCalculationListener;
import org.navalplanner.web.planner.order.PlanningState;
import org.navalplanner.web.planner.taskedition.EditTaskController;
import org.navalplanner.web.planner.taskedition.TaskPropertiesController.ResourceAllocationTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
@ -148,18 +149,18 @@ public class LimitingResourceAllocationController extends GenericForwardComposer
return resourceAllocationModel.getResourceAllocationRows();
}
public void onSelectWorkers(AllocationSelector allocationSelector) {
public void selectWorkers(AllocationSelector allocationSelector) {
try {
allocationSelector.addChoosen();
} finally {
tabLimitingResourceAllocation.setSelected(true);
allocationSelector.clearAll();
closeSelectWorkers();
Util.reloadBindings(gridLimitingAllocations);
}
}
public void onCloseSelectWorkers() {
public void closeSelectWorkers() {
clear();
tabLimitingResourceAllocation.setSelected(true);
}
public void clear() {

View file

@ -56,7 +56,7 @@
<hbox>
<newAllocationSelectorCombo id="limitingNewAllocationSelectorCombo" behaviour="LIMITING" />
<button label="${i18n:_('Add')}" onClick="limitingAllocationController.onSelectWorkers(limitingNewAllocationSelectorCombo)" />
<button label="${i18n:_('Add')}" onClick="limitingAllocationController.selectWorkers(limitingNewAllocationSelectorCombo)" />
<button label="${i18n:_('Advanced search')}" onClick="tabLimitingWorkerSearch.setSelected(true); " />
</hbox>
@ -81,8 +81,8 @@
<tabpanel >
<newAllocationSelector id="limitingNewAllocationSelector" behaviour="LIMITING" />
<hbox>
<button label="${i18n:_('Select')}" onClick="limitingAllocationController.onSelectWorkers(limitingNewAllocationSelector)" />
<button label="${i18n:_('Close')}" onClick="limitingAllocationController.onCloseSelectWorkers()" />
<button label="${i18n:_('Select')}" onClick="limitingAllocationController.selectWorkers(limitingNewAllocationSelector)" />
<button label="${i18n:_('Close')}" onClick="limitingAllocationController.closeSelectWorkers()" />
</hbox>
</tabpanel>
</tabpanels>