ItEr60S04ValidacionEProbasFuncionaisItEr59S04: After changing assignment type its associated tab is focused

This commit is contained in:
Lorenzo Tilve 2010-06-15 20:21:59 +02:00 committed by Javier Moran Rua
parent 5ccfaa95bb
commit dc455a0261
2 changed files with 16 additions and 1 deletions

View file

@ -221,6 +221,10 @@ public class EditTaskController extends GenericForwardComposer {
showEditForm(context, taskElement, planningState);
}
public void selectAssignmentTab(int index) {
editTaskTabbox.setSelectedIndex(index);
}
public void showEditFormSubcontract(
IContextWithPlannerTask<TaskElement> context,
TaskElement taskElement, PlanningState planningState) {

View file

@ -180,7 +180,7 @@ public class TaskPropertiesController extends GenericForwardComposer {
private ResourceAllocationTypeEnum originalState;
public void init(EditTaskController editTaskController,
public void init(final EditTaskController editTaskController,
IContextWithPlannerTask<TaskElement> context,
TaskElement taskElement) {
this.editTaskController = editTaskController;
@ -196,6 +196,17 @@ public class TaskPropertiesController extends GenericForwardComposer {
startConstraintDate.setDisabled(disabled);
lbResourceAllocationType.setDisabled(disabled);
lbResourceAllocationType.addEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
editTaskController
.selectAssignmentTab(lbResourceAllocationType
.getSelectedIndex() + 1);
}
});
taskEditFormComposer.init(context.getRelativeTo(), context.getTask());
updateComponentValuesForTask();
}