Disable inputs in AllocationRow if there is any manual allocation

FEA: ItEr75S23FixAllocationModel
This commit is contained in:
Manuel Rego Casasnovas 2011-10-05 08:38:04 +02:00
parent a22ba2e85b
commit 8af4932e5a
2 changed files with 5 additions and 8 deletions

View file

@ -500,17 +500,13 @@ public abstract class AllocationRow {
}
public void applyDisabledRules(CalculatedValue calculatedValue,
boolean recommendedAllocation) {
boolean recommendedAllocation, boolean isAnyManual) {
this.currentCalculatedValue = calculatedValue;
effortInput
.setDisabled(calculatedValue != CalculatedValue.RESOURCES_PER_DAY
|| recommendedAllocation
|| isAssignmentFunctionManual());
.setDisabled(calculatedValue !=CalculatedValue.RESOURCES_PER_DAY || recommendedAllocation || isAnyManual);
effortInput.setConstraint(constraintForHoursInput());
intendedResourcesPerDayInput
.setDisabled(calculatedValue == CalculatedValue.RESOURCES_PER_DAY
|| recommendedAllocation
|| isAssignmentFunctionManual());
.setDisabled(calculatedValue == CalculatedValue.RESOURCES_PER_DAY || recommendedAllocation || isAnyManual);
if (intendedResourcesPerDayInput.isDisabled()) {
clearRealResourcesPerDay();
}

View file

@ -249,7 +249,8 @@ public class FormBinder {
private void applyDisabledRulesOnRows() {
for (AllocationRow each : rows) {
each.applyDisabledRules(getCalculatedValue(), recommendedAllocation);
each.applyDisabledRules(getCalculatedValue(),
recommendedAllocation, isAnyManual());
}
}